-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Conversation
b789ab5
to
d802720
Compare
d802720
to
b194a6c
Compare
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 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.
b5bdf73
to
f0c95c7
Compare
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!