-
-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5bf44bc
commit 2ac9b1e
Showing
3 changed files
with
23 additions
and
23 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
'@urql/core': major | ||
--- | ||
|
||
Remove `defaultExchanges` from `@urql/core` and make `exchanges` a required property on `Client` construction. | ||
In doing so we make the `urql` package more tree-shakeable as the three default exchanges are in no code paths | ||
meaning they can be removed if not used. | ||
|
||
A migration would look as follows if you are currently creating a client without exchanges | ||
|
||
```js | ||
import { createClient, dedupExchange, cacheExchange, fetchExchange } from '@urql/core' | ||
|
||
const client = createClient({ | ||
url: '', | ||
exchanges: [dedupExchange, cacheExchange, fetchExchange] | ||
}); | ||
``` |
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
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