Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

1# @urql/exchange-persisted-fetch 2 3## 5.0.1 4 5### Patch Changes 6 7- Use nullish coalescing for `preferGetMethod` and `preferGetForPersistedQueries` so that `false` is kept if set 8 Submitted by [@dargmuesli](https://github.com/dargmuesli) (See [#3812](https://github.com/urql-graphql/urql/pull/3812)) 9- Updated dependencies (See [#3812](https://github.com/urql-graphql/urql/pull/3812)) 10 - @urql/core@6.0.1 11 12## 5.0.0 13 14### Major Changes 15 16- By default leverage GET for queries where the query-string + variables comes down to less than 2048 characters. 17 When upgrading it's important to see whether your server supports `GET`, if it doesn't ideally adding support for it 18 or alternatively setting `preferGetMethod` in the `createClient` method as well as `preferGetForPersistedQueries` for 19 the persisted exchange to `false` 20 Submitted by [@JoviDeCroock](https://github.com/JoviDeCroock) (See [#3789](https://github.com/urql-graphql/urql/pull/3789)) 21 22### Patch Changes 23 24- Updated dependencies (See [#3789](https://github.com/urql-graphql/urql/pull/3789) and [#3807](https://github.com/urql-graphql/urql/pull/3807)) 25 - @urql/core@6.0.0 26 27## 4.3.1 28 29### Patch Changes 30 31- Omit minified files and sourcemaps' `sourcesContent` in published packages 32 Submitted by [@kitten](https://github.com/kitten) (See [#3755](https://github.com/urql-graphql/urql/pull/3755)) 33- Updated dependencies (See [#3755](https://github.com/urql-graphql/urql/pull/3755)) 34 - @urql/core@5.1.1 35 36## 4.3.0 37 38### Minor Changes 39 40- Mark `@urql/core` as a peer dependency as well as a regular dependency 41 Submitted by [@kitten](https://github.com/kitten) (See [#3579](https://github.com/urql-graphql/urql/pull/3579)) 42 43## 4.2.0 44 45### Minor Changes 46 47- Add option to enable persisted-operations for subscriptions 48 Submitted by [@JoviDeCroock](https://github.com/JoviDeCroock) (See [#3549](https://github.com/urql-graphql/urql/pull/3549)) 49 50## 4.1.1 51 52### Patch Changes 53 54- Warn about cached persisted-miss results in development, when a `persistedExchange()` sees a persisted-miss error for a result that's already seen a persisted-miss error (i.e. two misses). This shouldn't happen unless something is caching persisted errors and we should warn about this appropriately 55 Submitted by [@kitten](https://github.com/kitten) (See [#3442](https://github.com/urql-graphql/urql/pull/3442)) 56 57## 4.1.0 58 59### Minor Changes 60 61- Allow persisted query logic to be skipped by the `persistedExchange` if the passed `generateHash` function resolves to a nullish value. This allows (A)PQ to be selectively disabled for individual operations 62 Submitted by [@kitten](https://github.com/kitten) (See [#3324](https://github.com/urql-graphql/urql/pull/3324)) 63 64### Patch Changes 65 66- Updated dependencies (See [#3317](https://github.com/urql-graphql/urql/pull/3317) and [#3308](https://github.com/urql-graphql/urql/pull/3308)) 67 - @urql/core@4.1.0 68 69## 4.0.1 70 71### Patch Changes 72 73- ⚠️ Fix `persistedExchange` ignoring teardowns in its initial operation mapping. Since the hash function is promisified, which defers any persisted operation, it needs to respect teardowns 74 Submitted by [@kitten](https://github.com/kitten) (See [#3312](https://github.com/urql-graphql/urql/pull/3312)) 75 76## 4.0.0 77 78### Major Changes 79 80- Update the `preferGetForPersistedQueries` option to include the `'force'` and `'within-url-limit'` values from the Client's `preferGetMethod` option. The default value of `true` no longer sets `OperationContext`'s `preferGetMethod` setting to `'force'`. Instead, the value of `preferGetForPersistedQueries` carries through to the `OperationContext`'s `preferGetMethod` setting for persisted queries 81 Submitted by [@NWRichmond](https://github.com/NWRichmond) (See [#3192](https://github.com/urql-graphql/urql/pull/3192)) 82 83## 3.0.1 84 85### Patch Changes 86 87- Publish with npm provenance 88 Submitted by [@kitten](https://github.com/kitten) (See [#3180](https://github.com/urql-graphql/urql/pull/3180)) 89 90## 3.0.0 91 92### Major Changes 93 94- Remove `persistedFetchExchange` and instead implement `persistedExchange`. This exchange must be placed in front of a terminating exchange (such as the default `fetchExchange` or a `subscriptionExchange` that supports persisted queries), and only modifies incoming operations to contain `extensions.persistedQuery`, which is sent on via the API. If the API expects Automatic Persisted Queries, requests are retried by this exchange internally 95 Submitted by [@kitten](https://github.com/kitten) (See [#3057](https://github.com/urql-graphql/urql/pull/3057)) 96- Rename `@urql/exchange-persisted-fetch` to `@urql/exchange-persisted` 97 Submitted by [@kitten](https://github.com/kitten) (See [#3057](https://github.com/urql-graphql/urql/pull/3057)) 98 99### Minor Changes 100 101- Update exchanges to drop redundant `share` calls, since `@urql/core`’s `composeExchanges` utility now automatically does so for us 102 Submitted by [@kitten](https://github.com/kitten) (See [#3082](https://github.com/urql-graphql/urql/pull/3082)) 103 104### Patch Changes 105 106- Refactor SHA256 logic to save on bundlesize 107 Submitted by [@kitten](https://github.com/kitten) (See [#3052](https://github.com/urql-graphql/urql/pull/3052)) 108- Upgrade to `wonka@^6.3.0` 109 Submitted by [@kitten](https://github.com/kitten) (See [#3104](https://github.com/urql-graphql/urql/pull/3104)) 110- Add TSDocs for all exchanges, documenting API internals 111 Submitted by [@kitten](https://github.com/kitten) (See [#3072](https://github.com/urql-graphql/urql/pull/3072)) 112- Updated dependencies (See [#3101](https://github.com/urql-graphql/urql/pull/3101), [#3033](https://github.com/urql-graphql/urql/pull/3033), [#3054](https://github.com/urql-graphql/urql/pull/3054), [#3053](https://github.com/urql-graphql/urql/pull/3053), [#3060](https://github.com/urql-graphql/urql/pull/3060), [#3081](https://github.com/urql-graphql/urql/pull/3081), [#3039](https://github.com/urql-graphql/urql/pull/3039), [#3104](https://github.com/urql-graphql/urql/pull/3104), [#3082](https://github.com/urql-graphql/urql/pull/3082), [#3097](https://github.com/urql-graphql/urql/pull/3097), [#3061](https://github.com/urql-graphql/urql/pull/3061), [#3055](https://github.com/urql-graphql/urql/pull/3055), [#3085](https://github.com/urql-graphql/urql/pull/3085), [#3079](https://github.com/urql-graphql/urql/pull/3079), [#3087](https://github.com/urql-graphql/urql/pull/3087), [#3059](https://github.com/urql-graphql/urql/pull/3059), [#3055](https://github.com/urql-graphql/urql/pull/3055), [#3057](https://github.com/urql-graphql/urql/pull/3057), [#3050](https://github.com/urql-graphql/urql/pull/3050), [#3062](https://github.com/urql-graphql/urql/pull/3062), [#3051](https://github.com/urql-graphql/urql/pull/3051), [#3043](https://github.com/urql-graphql/urql/pull/3043), [#3063](https://github.com/urql-graphql/urql/pull/3063), [#3054](https://github.com/urql-graphql/urql/pull/3054), [#3102](https://github.com/urql-graphql/urql/pull/3102), [#3097](https://github.com/urql-graphql/urql/pull/3097), [#3106](https://github.com/urql-graphql/urql/pull/3106), [#3058](https://github.com/urql-graphql/urql/pull/3058), and [#3062](https://github.com/urql-graphql/urql/pull/3062)) 113 - @urql/core@4.0.0 114 115## 2.1.0 116 117### Minor Changes 118 119- Adds enableForMutation option for exchange-persisted-fetch to enable persisted operations for mutations, by [@geekuillaume](https://github.com/geekuillaume) (See [#2951](https://github.com/urql-graphql/urql/pull/2951)) 120 121## 2.0.0 122 123### Major Changes 124 125- **Goodbye IE11!** 👋 This major release removes support for IE11. All code that is shipped will be transpiled much less and will _not_ be ES5-compatible anymore, by [@kitten](https://github.com/kitten) (See [#2504](https://github.com/FormidableLabs/urql/pull/2504)) 126- Upgrade to [Wonka v6](https://github.com/0no-co/wonka) (`wonka@^6.0.0`), which has no breaking changes but is built to target ES2015 and comes with other minor improvements. 127 The library has fully been migrated to TypeScript which will hopefully help with making contributions easier!, by [@kitten](https://github.com/kitten) (See [#2504](https://github.com/FormidableLabs/urql/pull/2504)) 128 129### Minor Changes 130 131- Remove the `babel-plugin-modular-graphql` helper, this because the graphql package hasn't converted to ESM yet which gives issues in node environments, by [@JoviDeCroock](https://github.com/JoviDeCroock) (See [#2551](https://github.com/FormidableLabs/urql/pull/2551)) 132 133### Patch Changes 134 135- Updated dependencies (See [#2551](https://github.com/FormidableLabs/urql/pull/2551), [#2504](https://github.com/FormidableLabs/urql/pull/2504), [#2619](https://github.com/FormidableLabs/urql/pull/2619), [#2607](https://github.com/FormidableLabs/urql/pull/2607), and [#2504](https://github.com/FormidableLabs/urql/pull/2504)) 136 - @urql/core@3.0.0 137 138## 1.3.4 139 140### Patch Changes 141 142- Extend peer dependency range of `graphql` to include `^16.0.0`. 143 As always when upgrading across many packages of `urql`, especially including `@urql/core` we recommend you to deduplicate dependencies after upgrading, using `npm dedupe` or `npx yarn-deduplicate`, by [@kitten](https://github.com/kitten) (See [#2133](https://github.com/FormidableLabs/urql/pull/2133)) 144- Updated dependencies (See [#2133](https://github.com/FormidableLabs/urql/pull/2133)) 145 - @urql/core@2.3.6 146 147## 1.3.3 148 149### Patch Changes 150 151- ⚠️ Fix Crypto API support for Web Workers and Node Crypto in ESM mode. Previously, when Node Crypto was required in Node ESM mode it would result in an error instead, since we didn't try a dynamic import fallback, by [@kitten](https://github.com/kitten) (See [#2123](https://github.com/FormidableLabs/urql/pull/2123)) 152 153## 1.3.2 154 155### Patch Changes 156 157- Optimize for minification by avoiding direct eval call, by [@nderscore](https://github.com/nderscore) (See [#1744](https://github.com/FormidableLabs/urql/pull/1744)) 158- Updated dependencies (See [#1776](https://github.com/FormidableLabs/urql/pull/1776) and [#1755](https://github.com/FormidableLabs/urql/pull/1755)) 159 - @urql/core@2.1.5 160 161## 1.3.1 162 163### Patch Changes 164 165- Remove closure-compiler from the build step (See [#1570](https://github.com/FormidableLabs/urql/pull/1570)) 166- Updated dependencies (See [#1570](https://github.com/FormidableLabs/urql/pull/1570), [#1509](https://github.com/FormidableLabs/urql/pull/1509), [#1600](https://github.com/FormidableLabs/urql/pull/1600), and [#1515](https://github.com/FormidableLabs/urql/pull/1515)) 167 - @urql/core@2.1.0 168 169## 1.3.0 170 171### Minor Changes 172 173- Add `enforcePersistedQueries` option to `persistedFetchExchange`, which disables automatic persisted queries and retry logic, and instead assumes that persisted queries will be handled like normal GraphQL requests, by [@kitten](https://github.com/kitten) (See [#1358](https://github.com/FormidableLabs/urql/pull/1358)) 174 175### Patch Changes 176 177- Updated dependencies (See [#1374](https://github.com/FormidableLabs/urql/pull/1374), [#1357](https://github.com/FormidableLabs/urql/pull/1357), and [#1375](https://github.com/FormidableLabs/urql/pull/1375)) 178 - @urql/core@2.0.0 179 180## 1.2.3 181 182### Patch Changes 183 184- ⚠️ Fix the production build overwriting the development build. Specifically in the previous release we mistakenly replaced all development bundles with production bundles. This doesn't have any direct influence on how these packages work, but prevented development warnings from being logged or full errors from being thrown, by [@kitten](https://github.com/kitten) (See [#1097](https://github.com/FormidableLabs/urql/pull/1097)) 185- Updated dependencies (See [#1097](https://github.com/FormidableLabs/urql/pull/1097)) 186 - @urql/core@1.14.1 187 188## 1.2.2 189 190### Patch Changes 191 192- Deprecate the `Operation.operationName` property in favor of `Operation.kind`. This name was 193 previously confusing as `operationName` was effectively referring to two different things. You can 194 safely upgrade to this new version, however to mute all deprecation warnings you will have to 195 **upgrade** all `urql` packages you use. If you have custom exchanges that spread operations, please 196 use [the new `makeOperation` helper 197 function](https://formidable.com/open-source/urql/docs/api/core/#makeoperation) instead, by [@bkonkle](https://github.com/bkonkle) (See [#1045](https://github.com/FormidableLabs/urql/pull/1045)) 198- Updated dependencies (See [#1094](https://github.com/FormidableLabs/urql/pull/1094) and [#1045](https://github.com/FormidableLabs/urql/pull/1045)) 199 - @urql/core@1.14.0 200 201## 1.2.1 202 203### Patch Changes 204 205- Omit the `Content-Type: application/json` HTTP header when using GET in the `fetchExchange`, `persistedFetchExchange`, or `multipartFetchExchange`, by [@JoviDeCroock](https://github.com/JoviDeCroock) (See [#957](https://github.com/FormidableLabs/urql/pull/957)) 206- Stops sending a persisted query if the hashing function fails, by [@lorenries](https://github.com/lorenries) (See [#934](https://github.com/FormidableLabs/urql/pull/934)) 207- Updated dependencies (See [#947](https://github.com/FormidableLabs/urql/pull/947), [#962](https://github.com/FormidableLabs/urql/pull/962), and [#957](https://github.com/FormidableLabs/urql/pull/957)) 208 - @urql/core@1.13.0 209 210## 1.2.0 211 212### Minor Changes 213 214- Pass the parsed GraphQL-document as a second argument to the `generateHash` option, by [@JoviDeCroock](https://github.com/JoviDeCroock) (See [#887](https://github.com/FormidableLabs/urql/pull/887)) 215 216### Patch Changes 217 218- Updated dependencies (See [#911](https://github.com/FormidableLabs/urql/pull/911) and [#908](https://github.com/FormidableLabs/urql/pull/908)) 219 - @urql/core@1.12.3 220 221## 1.1.0 222 223### Minor Changes 224 225- Adds support for custom hash functions by adding a `generateHash` option to the exchange, by [@lorenries](https://github.com/lorenries) (See [#870](https://github.com/FormidableLabs/urql/pull/870)) 226 227### Patch Changes 228 229- Updated dependencies (See [#880](https://github.com/FormidableLabs/urql/pull/880) and [#885](https://github.com/FormidableLabs/urql/pull/885)) 230 - @urql/core@1.12.2 231 232## 1.0.1 233 234### Patch Changes 235 236- Upgrade to a minimum version of wonka@^4.0.14 to work around issues with React Native's minification builds, which use uglify-es and could lead to broken bundles, by [@kitten](https://github.com/kitten) (See [#842](https://github.com/FormidableLabs/urql/pull/842)) 237- Updated dependencies (See [#838](https://github.com/FormidableLabs/urql/pull/838) and [#842](https://github.com/FormidableLabs/urql/pull/842)) 238 - @urql/core@1.12.0 239 240## 1.0.0 241 242### Major Changes 243 244- Change the `persistedFetchExchange` to be an exchange factory. The `persistedFetchExchange` now 245 expects to be called with options. An optional option, `preferGetForPersistedQueries`, may now 246 be passed to send persisted queries as a GET request, even when the `Client`'s `preferGetMethod` 247 option is `false`. 248 249To migrate you will have to update your usage of `persistedFetchExchange` from 250 251```js 252import { persistedFetchExchange } from '@urql/exchange-persisted-fetch'; 253 254createClient({ 255 exchanges: [persistedFetchExchange], 256}); 257``` 258 259to the following: 260 261```js 262import { persistedFetchExchange } from '@urql/exchange-persisted-fetch'; 263 264createClient({ 265 exchanges: [ 266 // Call the exchange and pass optional options: 267 persistedFetchExchange(), 268 ], 269}); 270``` 271 272### Patch Changes 273 274- Replace `js-sha256` polyfill for Node.js support with Node's Native Crypto API, by [@kitten](https://github.com/kitten) (See [#807](https://github.com/FormidableLabs/urql/pull/807)) 275- Updated dependencies (See [#798](https://github.com/FormidableLabs/urql/pull/798)) 276 - @urql/core@1.11.8 277 278## 0.1.3 279 280### Patch Changes 281 282- Add `source` debug name to all `dispatchDebug` calls during build time to identify events by which exchange dispatched them, by [@JoviDeCroock](https://github.com/JoviDeCroock) (See [#780](https://github.com/FormidableLabs/urql/pull/780)) 283- Updated dependencies (See [#780](https://github.com/FormidableLabs/urql/pull/780)) 284 - @urql/core@1.11.7 285 286## 0.1.2 287 288### Patch Changes 289 290- Add a `"./package.json"` entry to the `package.json`'s `"exports"` field for Node 14. This seems to be required by packages like `rollup-plugin-svelte` to function properly, by [@JoviDeCroock](https://github.com/JoviDeCroock) (See [#771](https://github.com/FormidableLabs/urql/pull/771)) 291- Updated dependencies (See [#771](https://github.com/FormidableLabs/urql/pull/771)) 292 - @urql/core@1.11.6 293 294## 0.1.1 295 296### Patch Changes 297 298- ⚠️ Fix `persistedFetchExchange` not sending the SHA256 hash extension after a cache miss (`PersistedQueryNotFound` error), by [@kitten](https://github.com/kitten) (See [#766](https://github.com/FormidableLabs/urql/pull/766)) 299 300## 0.1.0 301 302This is the initial release of `@urql/exchange-persisted-fetch` which adds Persisted Queries 303support, and is an exchange that can be used alongside the default `fetchExchange` or 304`@urql/exchange-multipart-fetch`. 305 306It's still experimental, just like `@urql/exchange-multipart-fetch`, so please test it with care and 307report any bugs you find.