-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to run multiple GraphQL endpoints in single application #2164
Comments
@kdawgwilk - I think this is part of a longer running missing feature. See: Scott |
Yeah I saw #721 but it seemed like that was only for code-first graphql but I have been doing only schema-first but after browsing around more I found #1999 which is basically my exact use case in written test form. I still think it was good to open a new issue since the other main related issues have been locked now. Its still valuable to know when someone else runs into this so we can help show how critical an issue this is so that way it might help get a fix prioritized. |
since #721 is locked I post the workaround here. for example,
and
Basically, we can use custom The custom decorator can just combine the name of The missing piece is to rename objects back:
|
|
Is there an existing issue for this?
Current behavior
In my
app.module.ts
I have a GraphQL gateway with a single subgraphAnd then I have a users resource with this federated subgraph
user.module.ts
on the route/users/graphql
The
/users/graphql
endpoint only works if the gateway is commented out so somehow these two graphql endpoints conflict with each otherMinimum reproduction code
https://github.com/kdawgwilk/nestjs-multiple-graphql-repro
Steps to reproduce
npm I
npm run start:dev
Expected behavior
I would have both graphql endpoints available
/graphql
for the gateway and/users/graphql
for the users subgraph and the gateway would be able to reach the subgraphPackage version
^10.0.10
Graphql version
NestJS version
8.4.4
Node.js version
16.14.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: