Skip to content
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

Merge remaining links from the apollo-link repo #6577

Merged
merged 11 commits into from
Jul 13, 2020
Merged

Conversation

hwillson
Copy link
Member

This PR merges the remaining apollo-link links into Apollo Client, giving each of them their own bundle/entry point:

  • apollo-link-batch is now accessible via @apollo/client/link/batch
  • apollo-link-batch-http is now accessible via @apollo/client/link/batch-http
  • apollo-link-context is now accessible via @apollo/client/link/context
  • apollo-link-error is now accessible via @apollo/client/link/error
  • apollo-link-retry is now accessible via @apollo/client/link/retry
  • apollo-link-schema is now accessible via @apollo/client/link/schema
  • apollo-link-ws is now accessible via @apollo/client/link/ws

We were previously planning on leaving these links in the apollo-link repo, and publishing them with new @apollo/link-X naming. We have since decided that there is more value in managing these links as part of the Apollo Client project, to help streamline library maintenance, and pave the way for tighter / more efficient Apollo Client interactions.

A quick note for reviewers (@benjamn @jcreighton): I've migrated the code as is (updating whatever needed updating to get the tests to pass), so you might want to skip over the link code / tests. 044db31 and f5dba6e are the main commits to review. Thanks!

Copy link
Member

@benjamn benjamn 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 overall!

I noticed that functions like validateOperation from the utils directory are included in every CJS bundle, but I guess there's no way around that, since we can't actually import from packages like @apollo/client/link/utils within these implementations. And the ESM modules are not bundled, so there's no duplication if you're using an ESM-aware bundler.

CHANGELOG.md Show resolved Hide resolved
config/rollup.config.js Show resolved Hide resolved
benjamn added a commit that referenced this pull request Jul 13, 2020
@hwillson hwillson merged commit 15dac4f into master Jul 13, 2020
@hwillson hwillson deleted the merge-remaining-links branch July 13, 2020 15:26
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants