forked from graphql/graphql-js
-
Notifications
You must be signed in to change notification settings - Fork 0
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
suggestions for execution #11
Merged
JoviDeCroock
merged 2 commits into
JoviDeCroock:fragment-args-execution-2024
from
yaacovCR:execution-suggestions
Aug 25, 2024
Merged
suggestions for execution #11
JoviDeCroock
merged 2 commits into
JoviDeCroock:fragment-args-execution-2024
from
yaacovCR:execution-suggestions
Aug 25, 2024
Conversation
This file contains 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
Hi @yaacovCR, 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:
|
yaacovCR
force-pushed
the
execution-suggestions
branch
2 times, most recently
from
August 25, 2024 11:43
2be8214
to
b83db68
Compare
JoviDeCroock
force-pushed
the
fragment-args-execution-2024
branch
2 times, most recently
from
August 25, 2024 11:50
1d24995
to
47ff0fb
Compare
yaacovCR
force-pushed
the
execution-suggestions
branch
2 times, most recently
from
August 25, 2024 11:57
b66f57a
to
666ef15
Compare
now extracted also to graphql-js PR, see graphql#4175
yaacovCR
force-pushed
the
execution-suggestions
branch
from
August 25, 2024 12:03
666ef15
to
525f05e
Compare
description updated above. |
also here and there just minimizes the diff with main on graphq-js |
JoviDeCroock
approved these changes
Aug 25, 2024
JoviDeCroock
merged commit Aug 25, 2024
d9bc448
into
JoviDeCroock:fragment-args-execution-2024
14 of 15 checks passed
JoviDeCroock
pushed a commit
that referenced
this pull request
Aug 30, 2024
* add directive test * add failing test add additional nested fragment test (#8) Correct test and lint stuff suggestions for execution (#11) * introduce internal getVariableSignature utility now extracted also to graphql-js PR, see graphql#4175 * execution suggestions fixes execution to always use fragment variable when has the same name as an operation variable previously, we were allowing an operation variable to be used if the fragment variable was not provided, and the field had no default. Now, we still use the fragment variable, and so the value is null. this now correct logic allows us to significantly reduce the diff from main adds additional test
JoviDeCroock
pushed a commit
that referenced
this pull request
Aug 30, 2024
* add directive test * add failing test add additional nested fragment test (#8) Correct test and lint stuff suggestions for execution (#11) * introduce internal getVariableSignature utility now extracted also to graphql-js PR, see graphql#4175 * execution suggestions fixes execution to always use fragment variable when has the same name as an operation variable previously, we were allowing an operation variable to be used if the fragment variable was not provided, and the field had no default. Now, we still use the fragment variable, and so the value is null. this now correct logic allows us to significantly reduce the diff from main adds additional test
JoviDeCroock
pushed a commit
that referenced
this pull request
Aug 30, 2024
* add directive test * add failing test add additional nested fragment test (#8) Correct test and lint stuff suggestions for execution (#11) * introduce internal getVariableSignature utility now extracted also to graphql-js PR, see graphql#4175 * execution suggestions fixes execution to always use fragment variable when has the same name as an operation variable previously, we were allowing an operation variable to be used if the fragment variable was not provided, and the field had no default. Now, we still use the fragment variable, and so the value is null. this now correct logic allows us to significantly reduce the diff from main adds additional test
JoviDeCroock
added a commit
that referenced
this pull request
Sep 4, 2024
* implement execution for fragment arguments syntax Co-authored-by: mjmahone <mahoney.mattj@gmail.com> * add directive test (#9) * add directive test * add failing test add additional nested fragment test (#8) Correct test and lint stuff suggestions for execution (#11) * introduce internal getVariableSignature utility now extracted also to graphql-js PR, see graphql#4175 * execution suggestions fixes execution to always use fragment variable when has the same name as an operation variable previously, we were allowing an operation variable to be used if the fragment variable was not provided, and the field had no default. Now, we still use the fragment variable, and so the value is null. this now correct logic allows us to significantly reduce the diff from main adds additional test * move getVariableSignature to execution as it cannot be used by validation, which must collect all errors rather than fail with invalid type for signature --------- Co-authored-by: mjmahone <mahoney.mattj@gmail.com> Co-authored-by: Yaacov Rydzinski <yaacovCR@gmail.com>
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.
The main purpose of this PR is to:
getArgumentValuesFromSpread
functionlocalVariableValues
and globalvariableValues
into a new map, instead passing them both to the relevant functionsexperimentalGetArgumentValues
function that can operate on Field nodes, Directive nodes, or Fragment spread nodes. (Parenthetically, the new function is only necessary because Field and Directive definitions store their arguments underargs
and Variable Definitions store them underarguments
. Need for the new function would be removed if we just checked inside the function what we are passed and selectedargs
orarguments
, but this way in v18 or v19 or v20 we can switch to the new function and have the caller just pick out the args from the definition on their own.)This also relies on the so that we re-use the same logic for operation variables and fragment variables