This repository has been archived by the owner on Sep 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 147
Passing context to @cypher, scalar payload mutations, fixes #200
Merged
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
upstream update
upstream merge
upstream merge
replaced getQuerySelections and getMutationSelections with getPayloadSelections because, for scalar payload mutations, getMutationSelections would return a selection set equal to the mutation's arguments
refactoring introduced isScalarSchemaType and schemaTypeField variables
includes some defensive branches from implementing support for scalar payload mutations
johnymontana
approved these changes
Feb 18, 2019
This was referenced Feb 19, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 PR introduces fixes and improvements to
@cypher
directive fields.Passing context data to
@cypher
statementsPassing context values to
@cypher
directive statements is now supported via a dedicatedcypherParams
context object in an Apollo server setup (#187).In the below example,
currentUserId
is provided in thecypherParams
context object. It can then be accessed as a Cypher parameter in all@cypher
directives (including custom queries and mutations).Fixes
Scalar payload types on
@cypher
fields (TypeError: Cannot read property 'selections' of undefined #145)Input type arguments on
@cypher
fields (Input type parameter not passed to custom Cypher query #192)Parameterized arguments on nested
@cypher
fields (Improper variable handling in cypher directive #136)Contains additional fix for removal of
neo4j_ignore
generation https://community.neo4j.com/t/orderby-with-makeaugmentedschema/4998/2Contains fix for parsing issue from augmentation process refactoring (Fields with arguments cause GraphQL Error #190)
Tests