Rename varsMap to argsMap#23
Merged
jneurock merged 2 commits intokloeckner-i:masterfrom Jul 10, 2019
Merged
Conversation
Previously the `vars` that were being passed down from the query mock were in fact the args for the root query selection and therefore already massaged by the GraphQL executor to have the correct names. This means that variables to be used further down the graph could either be missing or have the wrong names. This is tricky to explain succintly, please see the test case for a concrete example. In the test case, we are dealing with a scenario where the variable is used in both the root of the query *and* further down with a different name. If it were used further down and *not* in the root query then the variable would simply be absent prior to this patch. Co-authored-by: Chad Carbert <chadcarbert@me.com>
jneurock
reviewed
Jul 9, 2019
Previously this option worked with variable names rather than argument names. We believe mapping argument names is more useful and more likely to be the expected behavior. This patch removes any notion of mapping variable names and focuses strictly on argument names whilst also renaming the option to make it clearer what is being mapped. Closes kloeckner-i#22 Co-authored-by: Chad Carbert <chadcarbert@me.com>
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.
Previously this option worked with variable names rather than argument names. We believe mapping argument names is more useful and more likely to be the expected behavior. This patch removes any notion of mapping variable names and focuses strictly on argument names whilst also renaming the option to make it clearer what is being mapped.