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

Missing field validation on root operation types #156

Open
stuebingerb opened this issue Jan 10, 2025 · 0 comments
Open

Missing field validation on root operation types #156

stuebingerb opened this issue Jan 10, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@stuebingerb
Copy link
Owner

stuebingerb commented Jan 10, 2025

According to the spec, root operation types must be of type Object (3.3.1) and Object types must have at least one defined field (3.6). This is already validated for regular types but not for Query, Mutation, and Subscription.

Effectively, this also means that every valid schema needs to define at least one query, cf. graphql/graphql-js#448 (comment)

@stuebingerb stuebingerb added the bug Something isn't working label Jan 10, 2025
@stuebingerb stuebingerb self-assigned this Jan 10, 2025
@stuebingerb stuebingerb changed the title Missing validation on root operation types Missing field validation on root operation types Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant