[Validation] "root types exist" should be a formal validation #218
Labels
👻 Needs Champion
RFC Needs a champion to progress (See CONTRIBUTING.md)
💭 Strawman (RFC 0)
RFC Stage 0 (See CONTRIBUTING.md)
A GraphQL schema must have a query root, but mutation and subscription roots are optional. If a schema doesn't have a mutation root,
mutation
operations are invalid. Same forsubscription
: if there's nosubscription
root type, we should reject a document with an operation onsubscription
.We have this validation in graphql-ruby now (thanks @cjoudrey) but we didn't at first, because I was literally reading the spec and implementing the rules one-by-one.
Should that rule be in the spec? If so, I'm happy to try writing up (I think I have a bow tie around here somewhere 😆 ).
The text was updated successfully, but these errors were encountered: