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 Apollo Link common + HTTP functionality into core #5412

Merged
merged 30 commits into from
Oct 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
de18694
Add fetch-mock dep for link testing
hwillson Sep 27, 2019
3edfd4b
Initial import of Apollo Link code
hwillson Sep 27, 2019
8861959
Replace `apollo-link` package references with local references
hwillson Sep 27, 2019
7f045f8
Update Rollup globals to exclude deps for link code
hwillson Sep 30, 2019
7b35832
Adjust AC constructor to accept uri, crendentials, headers
hwillson Sep 30, 2019
3cf1efa
Remove deprecated makePromise
hwillson Sep 30, 2019
6be12f3
Adjust dependecies and types to accommodate link code
hwillson Sep 30, 2019
c76a56c
Re-export link core and htttp code
hwillson Sep 30, 2019
7aa1837
Additional exports needed by Apollo Link
hwillson Oct 3, 2019
e1fdf91
Update test snapshots after adding of `uri` to the AC constructor
hwillson Oct 3, 2019
b74c3d3
Remove unnecessary `mockLink` Apollo Link testing utility
hwillson Oct 3, 2019
c62bc1f
Move `SetContextLink` utilities into the only test that uses them
hwillson Oct 3, 2019
be1fdae
Move link test utilities into single test using them
hwillson Oct 3, 2019
5fe9e7f
Split link utilities into separate files and limit re-exports
hwillson Oct 3, 2019
87bb72f
Split link code up into smaller files and adjust re-exports
hwillson Oct 4, 2019
944d007
Re-arrange core link code to better reflect the implementation
hwillson Oct 4, 2019
77d1235
Export `UriFunction` type
hwillson Oct 4, 2019
705fc73
Increase bundlesize
hwillson Oct 4, 2019
62f9350
Adjust `checkFetcher` message to mention `@apollo/client`
hwillson Oct 4, 2019
6d574df
Expose `HttpLink` options to make unit testing easier
hwillson Oct 4, 2019
b87afc1
Add a few tests for the `ApolloClient` `uri` constructor option
hwillson Oct 4, 2019
f8b04d5
Fix HttpLink.ts file case issue
hwillson Oct 4, 2019
07463bc
Remove unreliable toKey and getKey properties from link operations.
benjamn Oct 4, 2019
74dbbf7
Simplify parseAndCheckHttpResponse.
benjamn Oct 4, 2019
fc5c068
Use constructor member declaration in HttpLink.
benjamn Oct 4, 2019
ff9d1fb
Directly export { default as Observable } from 'zen-observable'.
benjamn Oct 4, 2019
2a9445f
Replace Observable sub-class with module augmentation
hwillson Oct 6, 2019
b1cd004
Hide `Observable` implementation details
hwillson Oct 6, 2019
17fa3d8
Changelog update
hwillson Oct 6, 2019
34730a7
Merge branch 'release-3.0' into http-link-merge
hwillson Oct 6, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
- Eliminate "generated" cache IDs to avoid normalizing objects with no meaningful ID, significantly reducing cache memory usage. <br/>
[@benjamn](https://github.com/benjamn) in [#5146](https://github.com/apollographql/apollo-client/pull/5146)

- Apollo Link core and HTTP related functionality has been merged into `@apollo/client`. Functionality that was previously available through the `apollo-link`, `apollo-link-http-common` and `apollo-link-http` packages is now directly available from `@apollo/client` (e.g. `import { HttpLink } from '@apollo/client'`). The `ApolloClient` constructor has also been updated to accept new `uri`, `headers` and `credentials` options. If `uri` is specified, Apollo Client will take care of creating the necessary `HttpLink` behind the scenes. <br/>
[@hwillson](https://github.com/hwillson) in [#5412](https://github.com/apollographql/apollo-client/pull/5412)

### Breaking Changes

- Removed `graphql-anywhere` since it's no longer used by Apollo Client. <br/>
Expand Down
6 changes: 4 additions & 2 deletions config/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ import packageJson from '../package.json';
const distDir = './dist';

const globals = {
'apollo-link': 'apolloLink.core',
'tslib': 'tslib',
'ts-invariant': 'invariant',
'symbol-observable': '$$observable',
'graphql/language/printer': 'print',
optimism: 'optimism',
'graphql/language/visitor': 'visitor',
'graphql/language/printer': 'printer',
'graphql/execution/execute': 'execute',
'fast-json-stable-stringify': 'stringify',
'@wry/equality': 'wryEquality',
graphql: 'graphql',
react: 'React'
react: 'React',
'zen-observable': 'Observable'
};

const hasOwn = Object.prototype.hasOwnProperty;
Expand Down
Loading