Skip to content
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

Multiple graphql endpoints share merged schema (using include to specify module scope) #600

Closed
sadams opened this issue Feb 7, 2020 · 2 comments
Labels

Comments

@sadams
Copy link

sadams commented Feb 7, 2020

I'm submitting a...


[ ] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

Currently, if i register two graphql endpoints scoped to specific modules (using include: [MyModule]) the schema contains resolvers/types from both modules:
https://github.com/sadams/nestjs-graphql_multiple-endpoints-bug/tree/master
Meaning the schema is incorrect and i can't register two resolvers with the same name under different endpoints.

Expected behavior

Each endpoint should contain resolvers/types specific only to the modules included when registering each path.

Minimal reproduction of the problem with instructions

https://github.com/sadams/nestjs-graphql_multiple-endpoints-bug/tree/master

What is the motivation / use case for changing the behavior?

I need to expose completely separate graphql endpoints in the same application.

Environment


    "@nestjs/common": "6.11.6",
    "@nestjs/core": "6.11.6",
    "@nestjs/graphql": "6.5.4",

For Tooling issues:
- Node version: v10.16.3
- Platform: Mac

@sadams sadams changed the title Multiple graphql endpoints share merged schema (using include to specify module scope) Multiple graphql endpoints share merged schema (using include to specify module scope) Feb 7, 2020
@kamilmysliwiec
Copy link
Member

Looks like a duplicate of this issue #205

@lock
Copy link

lock bot commented Jun 24, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants