At a glance
- Identifier: #955
- Stage: RFC 3 / Accepted
- Champion: @benjaminjkraft
- Latest activity: Added to WG agenda on 2025-06-26
- Spec PR: https://github.com/graphql/graphql-spec/pull/955
- Related:
Spec PR description
Right now the spec says that, for example, if the schema does not define a mutation root type, then the schema does not support mutations. But there's no validation rule for it, which means that many parsers (including graphql-js) treat a mutation as valid against such a schema. (Indeed, many end up considering any mutation as valid, since they don't know what type to validate the root selection set against.) This commit adds a validation rule to make the schema text explicit.
Slated for discussion at the June 2 2022 working group meeting. Replaces #947. See also graphql/graphql-js#3592.
Update October 2024: this PR has been refreshed including changes proposed in #1098 and Benjie's editorial edits.
Fixes #1097
Timeline
- Added to WG agenda on 2025-06-26
- Added to WG agenda on 2024-12-05
- Mentioned in WG notes on 2024-12-01
- 9 commits pushed on 2024-10-17:
- benjie committed "Undo changes to Section 3"
- benjie committed "Merge branch 'main' into operation-type-validation"
- benjie committed "Editorial"
- benjie committed "Merge remote-tracking branch 'Shane32/Shane32-patch-1' into operation…"
- benjie committed "Move Shane's content"
- benjie committed "More editorial"
- benjie committed "More editorial"
- benjie committed "Update spec/Section 5 -- Validation.md"
- benjie committed "Update spec/Section 5 -- Validation.md"
- 2 commits pushed on 2024-10-04:
- Shane32 committed "Merge branch 'main' into Shane32-patch-1"
- Shane32 committed "Reformat"
- Commit pushed on 2024-06-04 by Shane32: Apply suggestions from code review
- 4 commits pushed on 2024-05-27:
- Shane32 committed "Add 5.2.4 Operation Type Configuration"
- Shane32 committed "Update spec/Section 5 -- Validation.md"
- Shane32 committed "Update spec/Section 5 -- Validation.md"
- Shane32 committed "Update spec/Section 5 -- Validation.md"
- 2 commits pushed on 2022-06-13:
- benjaminjkraft committed "typofix"
- benjaminjkraft committed "indentation"
- Added to WG agenda on 2022-06-02
- Spec PR created on 2022-06-01 by benjaminjkraft
- 2 commits pushed on 2022-06-01:
- benjaminjkraft committed "Add validation rule that operation types exist"
- benjaminjkraft committed "prettier"