-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
graphql: move alias to end of graphql pipeline #5369
Merged
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
MichaelJCompton
added
the
area/graphql
Issues related to GraphQL support on Dgraph.
label
May 5, 2020
pawanrawal
approved these changes
May 7, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love how the change was so simple.
Reviewed 15 of 15 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @manishrjain and @MichaelJCompton)
graphql/resolve/resolver_test.go, line 59 at r1 (raw file):
if resp.Errors != nil { fmt.Println(resp.Errors)
This could be part of the Nilf
check below.
harshil-goel
pushed a commit
that referenced
this pull request
May 19, 2020
harshil-goel
pushed a commit
that referenced
this pull request
May 20, 2020
(cherry picked from commit cb01b0d)
harshil-goel
added a commit
that referenced
this pull request
May 20, 2020
dna2github
pushed a commit
to dna2fork/dgraph
that referenced
this pull request
Jul 18, 2020
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.
We used to write alias into the Dgraph query so that the result already had the alias computed in it. That turns out to be awkward as we add more functionality, because:
This PR move all alias handling to the very last step as we write the final result. This means that throughout the pipeline all intermediate results are in terms of the schema fields.
I added an alias test for /admin ... not sure if we need to test everything there for alias. I feel that what we have is enough because you now can't return a result without it going through the GraphQL completion algorithm, so everything should be covered and it would take a big refactor to change that.
This change is
Docs Preview: