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

graphql: update introspection schema #4676

Merged
merged 5 commits into from
Sep 13, 2023
Merged

Conversation

saihaj
Copy link
Member

@saihaj saihaj commented Jun 6, 2023

Updating the introspection schema as per October 2021 spec update - http://spec.graphql.org/October2021/#sec-Schema-Introspection.Schema-Introspection-Schema

@saihaj saihaj force-pushed the saihaj/update-introspection branch from 363f4c5 to f53172e Compare June 16, 2023 16:12
@leoyvens
Copy link
Collaborator

Do the tests cover the added fields? We should make sure that they do, particularly because non-nullable fields were added.

@saihaj saihaj force-pushed the saihaj/update-introspection branch from f53172e to f810f35 Compare July 18, 2023 13:14
@saihaj
Copy link
Member Author

saihaj commented Jul 18, 2023

Do the tests cover the added fields? We should make sure that they do, particularly because non-nullable fields were added.

since it is a Boolean field it will return false if it does not exist

@leoyvens
Copy link
Collaborator

@saihaj didn't know that, is that in the graphql spec somewhere?

@lutter
Copy link
Collaborator

lutter commented Sep 1, 2023

I just added a commit to this PR that fixes the test failures.

When we execute a query, the schema we use for that is a combination of the subgraph schema and the introspection schema. When we mix the introspection schema into the subgraph schema, we add the two introspection fields to the subgraph schema's Query type. Before this PR, the introspection schema did not have a Query type; by adding a Query type to the introspection schema, the the subgraph schema's Query type gets replaced with the introspection schema's Query type, effectively erasing all the root query fields of the subgraph schema.

@saihaj saihaj merged commit 49b63ee into master Sep 13, 2023
6 checks passed
@saihaj saihaj deleted the saihaj/update-introspection branch September 13, 2023 02:36
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

Successfully merging this pull request may close these issues.

4 participants