This repository has been archived by the owner on Apr 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 344
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
We updated Apollo Link to avoid calling `lerna boostrap`, to mirror similar changes made in the Apollo Client repo. The Apollo Client repo is using Typescript project references however, which means we don't need to use Lerna's linking features to add symbolic links between monorep packages. In AC we can stop using `lerna boostrap`, but since Apollo Link isn't using Typescript project references yet, we need to keep Lerna's linking functionality in place. This commit adds `lerna link` to the `npm run bootstrap` script.
`apollo-utilities` was a dependency of Apollo Link, so that the `getOperationName` function could be used. This commit adds a local version of that function, so that the `apollo-utilities` dep can be dropped. The Deduplication Link tests were using their own version of the `getOperationName` function; that version has been removed, and the new version is being used instead.
Slight tweaks to get jest based coverage reporting working (they were changed #919).
It's not a runnable test suite by itself, but is instead imported when needed.
Codecov Report
@@ Coverage Diff @@
## master #926 +/- ##
==========================================
- Coverage 96.37% 95.21% -1.16%
==========================================
Files 20 22 +2
Lines 662 1024 +362
Branches 147 109 -38
==========================================
+ Hits 638 975 +337
- Misses 19 44 +25
Partials 5 5
Continue to review full report at Codecov.
|
benjamn
approved these changes
Jan 31, 2019
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!
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.
Apollo Link currently has a dependency on
apollo-utilities
, for the use of a single small utility function (getOperationName
). This means all of the links in this project are currently pulling inapollo-utilities
, which adds a fair bit of weight to their dependency graph (e.g.apollo-utilities
makes up about 45% ofapollo-link-http
's effective bundle size.This PR adds a copy of
getOperationName
into Apollo Link, and removes theapollo-utilities
dependency. It's worth noting that theDedupLink
tests were using their own copy ofgetOperationName
as well. That version has been removed, and the new function is being used instead.