At a glance
- Identifier: #1180
- Stage: RFC 1 / Proposal
- Champion: @JoviDeCroock
- Latest activity: 1 commit pushed on 2025-11-08
- Spec PR: https://github.com/graphql/graphql-spec/pull/1180
Spec PR description
We have a few cases where in validation rules we rely on a different rule ensuring that the definition for usage exists.
- Overlapping Fields, we use a Fragment Definition looked up by a SpreadName that potentially does not exist
- VariablesOfCorrectType, we look up a VariableDefinition from a VariableName which could potentially not exist.
In GraphQL JS we already guard against this in a few places
- https://github.com/graphql/graphql-js/blob/16.x.x/src/validation/rules/VariablesInAllowedPositionRule.ts#L46
- https://github.com/graphql/graphql-js/blob/8a16e93cb8a98b0f773164d7da6215aa47a85746/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts#L266
Timeline
- Commit pushed on 2025-11-08 by JoviDeCroock: Merge branch 'main' into fix-crash-cases
- Spec PR created on 2025-07-05 by JoviDeCroock
- Commit pushed on 2025-07-05 by JoviDeCroock: Fix cases in validation that cause crashes