Skip to content
This repository was archived by the owner on Apr 14, 2023. It is now read-only.

Add client awareness settings to request headers #872

Merged
merged 6 commits into from
Nov 21, 2018

Conversation

hwillson
Copy link
Member

This PR modifies apollo-link-http such that if name or version client awareness settings are found in the incoming operation context, they'll be extracted and added as headers to all outgoing requests. The header names used (apollographql-client-name and apollographql-client-version) line up with the associated Apollo Server changes made in apollographql/apollo-server#1960.

Associated Apollo Client PR: apollographql/apollo-client#4154

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-io
Copy link

codecov-io commented Nov 19, 2018

Codecov Report

Merging #872 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
packages/apollo-link-http/src/httpLink.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65c213d...199ccc6. Read the comment docs.

Copy link
Contributor

@evans evans left a 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

Copy link

@zionts zionts left a 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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants