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

Missing resolvers in supergraph schema, potential issue with Query/Mutation type merging #8180

Open
2 of 4 tasks
faris-dizdarevic-transflo opened this issue Dec 23, 2024 · 2 comments

Comments

@faris-dizdarevic-transflo
Copy link

faris-dizdarevic-transflo commented Dec 23, 2024

Issue workflow progress

Progress of the issue based on the Contributor Workflow

  • 1. The issue provides a reproduction available on CodeSandbox

Make sure to fork this template and follow the README instructions.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

The majority of resolvers are missing from the Mesh-generated supergraph.graphql schema and subsequently the GQL explorer when running my Hive Gateway on top of a single GQL subgraph running Yoga with a GraphQL Codegen server preset.

To Reproduce Steps to reproduce the behavior:

In the CodeSandbox above, I recommend following the README to first set up and run the subgraph. View the schema/explorer and note the available resolvers. Then, run the gateway and note the missing resolvers.

Expected behavior

I would expect to see all Query and Mutation resolvers from the different parts of my subgraph merged together in the final supergraph.

Environment:

See CodeSandbox package.json.

Additional context

Did some debugging of the compose CLI and I noted that the introspection query DOES manage to retrieve the full schema which contains multiple extend type Query and extend type Mutation definitions of which only the very last one (of each) gets pulled into the supergraph. I didn't debug any further into the graphql libs.

@ardatan
Copy link
Owner

ardatan commented Dec 24, 2024

I think the scripts and configuration for Codegen are missing. Could you add some instructions to the CodeSandbox to reproduce the issue step by step, and make sure it shows the issue as expected? Thanks 🙏

@faris-dizdarevic-transflo
Copy link
Author

faris-dizdarevic-transflo commented Dec 24, 2024

I think the scripts and configuration for Codegen are missing. Could you add some instructions to the CodeSandbox to reproduce the issue step by step, and make sure it shows the issue as expected? Thanks 🙏

First time using CodeSandbox haha sorry about that - I've updated the link to the sandbox so it should be accessible now. Please ignore the "install dependencies" terminal that opens and just reference the "start" terminal which should automatically boot both the subgraph & gateway and expose them under preview URLs. (local ports are :8080 and :8081, respectively). The README has instructions on the expected issue and how it can be viewed.

The codegen is with the subgraph under example_subgraph, while the Mesh and Hive gateway config is under gateway.

Appreciate the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants