-
-
Notifications
You must be signed in to change notification settings - Fork 818
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
Stitching schema without Query #659
Comments
My guess is that this is on purpose, to align with the official GraphQL spec: http://facebook.github.io/graphql/June2018/#sec-Root-Operation-Types
That is, a GraphQL API must have a Query type. I find this a pretty nonsensical part of the spec, especially now that subscriptions exist too; hopefully this changes in the future. |
@jonbudd agreed... same issue with a |
Can be tracked at spec at graphql/graphql-spec#218 and graphql/graphql-spec#490 |
I am trying to stitch a schema that only contains a Mutation type (email service) but mergeSchema fails.
Intended outcome
Trying to stitch a schema that only contains
type Mutation
(without atype Query
) should successfully merge into other schemas.Actual outcome
The stitching fails with
TypeError: Cannot read property 'getFields' of null
inmergeSchema.js
How to reproduce the issue
Try stitching a schema like:
The text was updated successfully, but these errors were encountered: