This repository was archived by the owner on Apr 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 343
Add client awareness settings to request headers #872
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
80 char width is used in most Apollo repos, but let's leave this up to users to set for now.
If `name` or `version` client awareness settings are found in the incoming context, add them to the outgoing request headers in the format expected by Apollo Server.
Codecov Report
@@ Coverage Diff @@
## master #872 +/- ##
==========================================
+ Coverage 96.15% 96.19% +0.03%
==========================================
Files 20 20
Lines 651 657 +6
Branches 155 159 +4
==========================================
+ Hits 626 632 +6
Misses 19 19
Partials 6 6
Continue to review full report at Codecov.
|
evans
approved these changes
Nov 19, 2018
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.
Looks great! Small suggestion
zionts
approved these changes
Nov 19, 2018
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.
This one I feel good about giving the 👍 after the #TODO is replaced
zionts
reviewed
Nov 19, 2018
Co-Authored-By: hwillson <[email protected]>
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 modifies
apollo-link-http
such that ifname
orversion
client awareness settings are found in the incomingoperation
context
, they'll be extracted and added as headers to all outgoing requests. The header names used (apollographql-client-name
andapollographql-client-version
) line up with the associated Apollo Server changes made in apollographql/apollo-server#1960.Associated Apollo Client PR: apollographql/apollo-client#4154