feat: executing documents containing fragment-arguments#1
Closed
JoviDeCroock wants to merge 0 commit into
Closed
Conversation
|
Hi @JoviDeCroock, I'm @github-actions bot happy to help you with this PR 👋 Supported commandsPlease post this commands in separate comments and only one per comment:
|
8cc6c93 to
73a13f3
Compare
JoviDeCroock
commented
Jan 27, 2024
| // replacing an unset fragment argument with an operation | ||
| // variable value. Fragment arguments must always have LOCAL scope. | ||
| // | ||
| // TODO: To remove this hack, we need to either: |
Owner
Author
There was a problem hiding this comment.
The issue here presents itself in that fragments can define arguments like
fragment x($id: ID!) on Y { todo(id: $id) { text } }
Which can be passed in through fragment spreads
...x(id: '2')
now what happens when we spread x and there is an $id present on the document itself, if we aren't using __UNSET it would leverage that one which we don't want. There might be a better solution in carrying variables around as we visit the FragmentSpread and the accompanying FragmentDefinition
| import type { FragmentSpreadNode } from '../language/ast.js'; | ||
| import { print } from '../language/printer.js'; | ||
|
|
||
| // TODO: follow up on https://github.com/graphql/graphql-js/pull/3835/files#r1100999816 |
Owner
Author
There was a problem hiding this comment.
There was an open comment here https://github.com/graphql/graphql-js/pull/3835/files#r1100999816
73a13f3 to
8f3f760
Compare
8f3f760 to
e2d8d2d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a 2024 update of graphql#3835 where all discussions have been carried over in code comments, they are highlighted already as review comments here as well.
This PR splits out the execution part so we can look at that in detail, I will pause here as the fragment-keying remarks will most likely have quite an impact on the validation changes.