Skip to content

[Validation] "root types exist" should be a formal validation #218

@rmosolgo

Description

@rmosolgo

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 for subscription: if there's no subscription root type, we should reject a document with an operation on subscription.

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 😆 ).

Metadata

Metadata

Assignees

No one assigned

    Labels

    👻 Needs ChampionRFC Needs a champion to progress (See CONTRIBUTING.md)💭 Strawman (RFC 0)RFC Stage 0 (See CONTRIBUTING.md)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions