At a glance
- Identifier: #1081
- Stage: RFC 2 / Draft
- Champion: @JoviDeCroock
- Latest activity: Spec PR closed on 2026-03-08
- Spec PR: https://github.com/graphql/graphql-spec/pull/1081
- Related:
Spec PR description
This spec contains amendments to https://github.com/graphql/graphql-spec/pull/1010, a diffed view is available at https://github.com/mjmahone/graphql-spec/pull/3.
These amendments are made from comments on the implementation PR and alterations from the new implementation
- Changing fragment-key to just be fragment-name https://github.com/graphql/graphql-js/pull/3835#discussion_r1101825832
- Removing the substitution logic and going closer to the
coercelogic we use in the general flow
In general the biggest changes are that we introduce fragmentVariableValues which will be on the groupedFieldSet, these are derived from the arguments in scope of the fragmentDefinition where this field is used.
We introduce localFragmentVariables which as we are traversing down fragment-spreads are a coerced set of variables i.e.
query($b: String!, $c: String!) {
field3(b: $b) ## uses b from variable-values
...A(a: "A", b: "B")
}
fragment A($a: String!, $b: String!) on X {
field(a: $a) ## uses $a from localVariableValues
field2(c: $c) ## we have access to variableValues so we take c from there
...B(b: $b) ## uses $b from localVariableValues
}
fragment B($b: String!) on X {
## This fragment has access to $b and $c but not to $a
field4(b: $b) ## uses $b from localVariableValues
}
Last but not least we introduce getArgumentValuesFromSpread which looks at the spread and fragment-definition and establishes a coerced set of localVariableValues.
Timeline
- Spec PR closed on 2026-03-08
- @JoviDeCroock committed "Merge pull request #2 from benjie/fragments-editorial" on 2025-11-28
- 12 commits pushed on 2025-11-27
- @benjie committed "{operation,fragment}-defined variable -> {operation,fragment} variable"
- @benjie committed "Editorial"
- @benjie committed "Correct algorithm and provide clarifying note"
- @benjie committed "Do not allow merging of fragments referencing different variables"
- @benjie committed "Split logic for fragment arguments from directive/field arguments"
- @benjie committed "Consistency"
- @benjie committed "Precision and clarity"
- @benjie committed "Add examples and clarify wording/algorithm"
- @benjie committed "Spec consistency"
- @benjie committed "Editorial"
- @benjie committed "Editorial"
- @benjie committed "Fix algorithm mistake"
- 2 commits pushed on 2025-11-13
- @benjie committed "Merge branch 'main' into fragment-args-2024-amendments"
- @benjie committed "Add missing grammar"
- @JoviDeCroock committed "Merge branch 'main' into fragment-args-2024-amendments" on 2025-10-07
- @JoviDeCroock committed "Merge branch 'main' into fragment-args-2024-amendments" on 2025-09-10
- 3 commits pushed on 2025-07-03
- @JoviDeCroock committed "Fixes"
- @JoviDeCroock committed "Merge branch 'main' into fragment-args-2024-amendments"
- @JoviDeCroock committed "Formatting"
- @JoviDeCroock committed "Merge branch 'main' into fragment-args-2024-amendments" on 2025-07-02
- Top comment edited on 2025-06-19 by benjie
- Advanced to RFC 2 on 2025-03-06 by leebyron
- Added to WG agenda on 2025-03-06
- @JoviDeCroock committed "Partial update, rest depends on https://github.com/graphql/graphql-sp…" on 2025-02-15
- @JoviDeCroock committed "update validation" on 2024-09-04
- @JoviDeCroock committed "Merge branch 'main' into fragment-args-2024-amendments" on 2024-08-08
- Mentioned in WG notes on 2024-08-01
- @JoviDeCroock committed "Merge branch 'main' into fragment-args-2024-amendments" on 2024-06-11
- @JoviDeCroock committed "formatting" on 2024-06-09
- 2 commits pushed on 2024-06-08
- @JoviDeCroock committed "wording"
- @JoviDeCroock committed "Merge branch 'main' into fragment-args-2024-amendments"
- @JoviDeCroock committed "Update spec/Section 5 -- Validation.md" on 2024-06-06
- Advanced to RFC 1 on 2024-06-06 by leebyron
- Added to WG agenda on 2024-06-06
- @JoviDeCroock committed "Update spec/Section 5 -- Validation.md" on 2024-06-04
- Mentioned in WG notes on 2024-06-01
- @JoviDeCroock committed "fix formatting" on 2024-05-23
- @JoviDeCroock committed "Ensure variables are defined" on 2024-05-17
- 5 commits pushed on 2024-05-16
- @JoviDeCroock committed "Apply suggestions from code review"
- @JoviDeCroock committed "remove non standard hyphens"
- @JoviDeCroock committed "address redundant if"
- @JoviDeCroock committed "address logical or"
- @JoviDeCroock committed "clarify example"
- 4 commits pushed on 2024-03-30
- @JoviDeCroock committed "formatting and expand examples"
- @JoviDeCroock committed "add in undefined fragment"
- @JoviDeCroock committed "unset instead of null"
- @JoviDeCroock committed "shorten"
- 2 commits pushed on 2024-03-29
- @JoviDeCroock committed "Apply suggestions from code review"
- @JoviDeCroock committed "Apply suggestions from code review"
- 2 commits pushed on 2024-03-27
- @JoviDeCroock committed "Apply Benjie's suggestions"
- @JoviDeCroock committed "conciser validation"
- @JoviDeCroock committed "Remove unused `$__UNSET`" on 2024-03-26
- Top comment edited on 2024-03-22 by JoviDeCroock
- 2 commits pushed on 2024-03-08
- @JoviDeCroock committed "address validation comments"
- @JoviDeCroock committed "address language comments"
- Added to WG agenda on 2024-03-07
- Mentioned in WG notes on 2024-03-01
- @JoviDeCroock committed "Update spec/Section 2 -- Language.md" on 2024-02-27
- Top comment edited on 2024-02-16 by JoviDeCroock
- Spec PR created on 2024-02-16 by JoviDeCroock
- @JoviDeCroock committed "corrections" on 2024-02-16
- @JoviDeCroock committed "wording" on 2024-02-12
- 2 commits pushed on 2024-02-07
- @JoviDeCroock committed "address https://github.com/graphql/graphql-js/pull/3835#discussion_r1…"
- @JoviDeCroock committed "wip"
- @mjmahone committed "RFC: Fragment Arguments" on 2023-01-02