You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If two schemas merged which have different query type name (like Query and RootQuery) one of them is lost during the merging meaning certain queries (which are based on the 'lost' schema) will indicate schema errors.
Notice the generation fails with validation error. This is because during merging the Query query type has been lost and the validation of the user query is failed.
Expected behavior
I am by no means a GraphQL expert, but I assume there can only be one query type in the schema, it is Query if we don't specify explicitly, but we can also specify it like:
schema {
query: Query
}
And even we can use a different name for the type:
schema {
query: RootQuery
}
But still, there is only one such type per schema, so I think this still could be merged properly.
Screenshots or Videos
No response
Platform
OS: tested on MacOS, but this is not OS specific
NodeJS: 16.15.1.
graphql version: 16.2.0
@graphql-codegen/* version: 2.13.7
Codegen Config File
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
If two schemas merged which have different query type name (like
Query
andRootQuery
) one of them is lost during the merging meaning certain queries (which are based on the 'lost' schema) will indicate schema errors.Your Example Website or App
https://codesandbox.io/s/twilight-dream-1snwfw
Steps to Reproduce the Bug or Issue
yarn generate
.Query
query type has been lost and the validation of theuser
query is failed.Expected behavior
I am by no means a GraphQL expert, but I assume there can only be one query type in the schema, it is
Query
if we don't specify explicitly, but we can also specify it like:And even we can use a different name for the type:
But still, there is only one such type per schema, so I think this still could be merged properly.
Screenshots or Videos
No response
Platform
graphql
version: 16.2.0@graphql-codegen/*
version: 2.13.7Codegen Config File
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: