-
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
fix(GraphQL): Pass on HTTP request headers for subscriptions #7806
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
github-actions
bot
added
the
area/graphql
Issues related to GraphQL support on Dgraph.
label
May 11, 2021
abhimanyusinghgaur
requested review from
manishrjain and
vvbalaji-dgraph
as code owners
May 11, 2021 14:45
aman-bansal
approved these changes
May 11, 2021
abhimanyusinghgaur
changed the title
fix(GraphQL): return as soon as error is encountered
fix(GraphQL): Pass on HTTP request headers for subscriptions
May 11, 2021
aman-bansal
added a commit
that referenced
this pull request
May 11, 2021
* return as soon as error is encountered * fix comment * add more logs * fixing the http request header to be set in the subscription * fixing header type cast Co-authored-by: aman-bansal <bansalaman2905@gmail.com>
aman-bansal
added a commit
that referenced
this pull request
May 11, 2021
…7807) * return as soon as error is encountered * fix comment * add more logs * fixing the http request header to be set in the subscription * fixing header type cast Co-authored-by: aman-bansal <bansalaman2905@gmail.com> Co-authored-by: Abhimanyu Singh Gaur <12651351+abhimanyusinghgaur@users.noreply.github.com>
all-seeing-code
pushed a commit
that referenced
this pull request
Jan 4, 2023
…7807) * return as soon as error is encountered * fix comment * add more logs * fixing the http request header to be set in the subscription * fixing header type cast Co-authored-by: aman-bansal <bansalaman2905@gmail.com> Co-authored-by: Abhimanyu Singh Gaur <12651351+abhimanyusinghgaur@users.noreply.github.com> (cherry picked from commit dbd5744)
all-seeing-code
added a commit
that referenced
this pull request
Jan 5, 2023
…7807) (#8574) Include headers from subscribe request and pass it along the downstream for processing. Co-authored-by: aman-bansal <bansalaman2905@gmail.com> Co-authored-by: Abhimanyu Singh Gaur <12651351+abhimanyusinghgaur@users.noreply.github.com> (cherry picked from commit dbd5744) Co-authored-by: aman bansal <bansalaman2905@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.
This PR passes the HTTP headers for a subscription request using the
RequestHeader
context key to theSubscribe
call.Earlier, the
Header
key in the context supported passing the headers to theSubscribe
call, but that required one to send an init request for the subscription with the init payload being set to a JSON object representing theHeader
.It is not possible in Dgraph cloud to modify the request payload, so we need to make this change.
Later, we should find one permanent fix for passing the HTTP headers for subscriptions. Also, our port of the
graphql-transport-ws
lib is far behind the source, so we should update that at some point.This change is