Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
@urql/exchange-persisted-fetch#
5.0.1#
Patch Changes#
- Use nullish coalescing for
preferGetMethodandpreferGetForPersistedQueriesso thatfalseis kept if set Submitted by @dargmuesli (See #3812) - Updated dependencies (See #3812)
- @urql/core@6.0.1
5.0.0#
Major Changes#
- By default leverage GET for queries where the query-string + variables comes down to less than 2048 characters.
When upgrading it's important to see whether your server supports
GET, if it doesn't ideally adding support for it or alternatively settingpreferGetMethodin thecreateClientmethod as well aspreferGetForPersistedQueriesfor the persisted exchange tofalseSubmitted by @JoviDeCroock (See #3789)
Patch Changes#
4.3.1#
Patch Changes#
- Omit minified files and sourcemaps'
sourcesContentin published packages Submitted by @kitten (See #3755) - Updated dependencies (See #3755)
- @urql/core@5.1.1
4.3.0#
Minor Changes#
- Mark
@urql/coreas a peer dependency as well as a regular dependency Submitted by @kitten (See #3579)
4.2.0#
Minor Changes#
- Add option to enable persisted-operations for subscriptions Submitted by @JoviDeCroock (See #3549)
4.1.1#
Patch Changes#
- 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 Submitted by @kitten (See #3442)
4.1.0#
Minor Changes#
- Allow persisted query logic to be skipped by the
persistedExchangeif the passedgenerateHashfunction resolves to a nullish value. This allows (A)PQ to be selectively disabled for individual operations Submitted by @kitten (See #3324)
Patch Changes#
4.0.1#
Patch Changes#
- ⚠️ Fix
persistedExchangeignoring teardowns in its initial operation mapping. Since the hash function is promisified, which defers any persisted operation, it needs to respect teardowns Submitted by @kitten (See #3312)
4.0.0#
Major Changes#
- Update the
preferGetForPersistedQueriesoption to include the'force'and'within-url-limit'values from the Client'spreferGetMethodoption. The default value oftrueno longer setsOperationContext'spreferGetMethodsetting to'force'. Instead, the value ofpreferGetForPersistedQueriescarries through to theOperationContext'spreferGetMethodsetting for persisted queries Submitted by @NWRichmond (See #3192)
3.0.1#
Patch Changes#
3.0.0#
Major Changes#
- Remove
persistedFetchExchangeand instead implementpersistedExchange. This exchange must be placed in front of a terminating exchange (such as the defaultfetchExchangeor asubscriptionExchangethat supports persisted queries), and only modifies incoming operations to containextensions.persistedQuery, which is sent on via the API. If the API expects Automatic Persisted Queries, requests are retried by this exchange internally Submitted by @kitten (See #3057) - Rename
@urql/exchange-persisted-fetchto@urql/exchange-persistedSubmitted by @kitten (See #3057)
Minor Changes#
- Update exchanges to drop redundant
sharecalls, since@urql/core’scomposeExchangesutility now automatically does so for us Submitted by @kitten (See #3082)
Patch Changes#
- Refactor SHA256 logic to save on bundlesize Submitted by @kitten (See #3052)
- Upgrade to
wonka@^6.3.0Submitted by @kitten (See #3104) - Add TSDocs for all exchanges, documenting API internals Submitted by @kitten (See #3072)
- Updated dependencies (See #3101, #3033, #3054, #3053, #3060, #3081, #3039, #3104, #3082, #3097, #3061, #3055, #3085, #3079, #3087, #3059, #3055, #3057, #3050, #3062, #3051, #3043, #3063, #3054, #3102, #3097, #3106, #3058, and #3062)
- @urql/core@4.0.0
2.1.0#
Minor Changes#
- Adds enableForMutation option for exchange-persisted-fetch to enable persisted operations for mutations, by @geekuillaume (See #2951)
2.0.0#
Major Changes#
- 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 (See #2504)
- Upgrade to Wonka v6 (
wonka@^6.0.0), which has no breaking changes but is built to target ES2015 and comes with other minor improvements. The library has fully been migrated to TypeScript which will hopefully help with making contributions easier!, by @kitten (See #2504)
Minor Changes#
- Remove the
babel-plugin-modular-graphqlhelper, this because the graphql package hasn't converted to ESM yet which gives issues in node environments, by @JoviDeCroock (See #2551)
Patch Changes#
1.3.4#
Patch Changes#
- Extend peer dependency range of
graphqlto include^16.0.0. As always when upgrading across many packages ofurql, especially including@urql/corewe recommend you to deduplicate dependencies after upgrading, usingnpm dedupeornpx yarn-deduplicate, by @kitten (See #2133) - Updated dependencies (See #2133)
- @urql/core@2.3.6
1.3.3#
Patch Changes#
- ⚠️ 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 (See #2123)
1.3.2#
Patch Changes#
- Optimize for minification by avoiding direct eval call, by @nderscore (See #1744)
- Updated dependencies (See #1776 and #1755)
- @urql/core@2.1.5
1.3.1#
Patch Changes#
- Remove closure-compiler from the build step (See #1570)
- Updated dependencies (See #1570, #1509, #1600, and #1515)
- @urql/core@2.1.0
1.3.0#
Minor Changes#
- Add
enforcePersistedQueriesoption topersistedFetchExchange, which disables automatic persisted queries and retry logic, and instead assumes that persisted queries will be handled like normal GraphQL requests, by @kitten (See #1358)
Patch Changes#
1.2.3#
Patch Changes#
- ⚠️ 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 (See #1097)
- Updated dependencies (See #1097)
- @urql/core@1.14.1
1.2.2#
Patch Changes#
- Deprecate the
Operation.operationNameproperty in favor ofOperation.kind. This name was previously confusing asoperationNamewas effectively referring to two different things. You can safely upgrade to this new version, however to mute all deprecation warnings you will have to upgrade allurqlpackages you use. If you have custom exchanges that spread operations, please use the newmakeOperationhelper function instead, by @bkonkle (See #1045) - Updated dependencies (See #1094 and #1045)
- @urql/core@1.14.0
1.2.1#
Patch Changes#
- Omit the
Content-Type: application/jsonHTTP header when using GET in thefetchExchange,persistedFetchExchange, ormultipartFetchExchange, by @JoviDeCroock (See #957) - Stops sending a persisted query if the hashing function fails, by @lorenries (See #934)
- Updated dependencies (See #947, #962, and #957)
- @urql/core@1.13.0
1.2.0#
Minor Changes#
- Pass the parsed GraphQL-document as a second argument to the
generateHashoption, by @JoviDeCroock (See #887)
Patch Changes#
1.1.0#
Minor Changes#
- Adds support for custom hash functions by adding a
generateHashoption to the exchange, by @lorenries (See #870)
Patch Changes#
1.0.1#
Patch Changes#
- 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 (See #842)
- Updated dependencies (See #838 and #842)
- @urql/core@1.12.0
1.0.0#
Major Changes#
- Change the
persistedFetchExchangeto be an exchange factory. ThepersistedFetchExchangenow expects to be called with options. An optional option,preferGetForPersistedQueries, may now be passed to send persisted queries as a GET request, even when theClient'spreferGetMethodoption isfalse.
To migrate you will have to update your usage of persistedFetchExchange from
import { persistedFetchExchange } from '@urql/exchange-persisted-fetch';
createClient({
exchanges: [persistedFetchExchange],
});
to the following:
import { persistedFetchExchange } from '@urql/exchange-persisted-fetch';
createClient({
exchanges: [
// Call the exchange and pass optional options:
persistedFetchExchange(),
],
});
Patch Changes#
- Replace
js-sha256polyfill for Node.js support with Node's Native Crypto API, by @kitten (See #807) - Updated dependencies (See #798)
- @urql/core@1.11.8
0.1.3#
Patch Changes#
- Add
sourcedebug name to alldispatchDebugcalls during build time to identify events by which exchange dispatched them, by @JoviDeCroock (See #780) - Updated dependencies (See #780)
- @urql/core@1.11.7
0.1.2#
Patch Changes#
- Add a
"./package.json"entry to thepackage.json's"exports"field for Node 14. This seems to be required by packages likerollup-plugin-svelteto function properly, by @JoviDeCroock (See #771) - Updated dependencies (See #771)
- @urql/core@1.11.6
0.1.1#
Patch Changes#
- ⚠️ Fix
persistedFetchExchangenot sending the SHA256 hash extension after a cache miss (PersistedQueryNotFounderror), by @kitten (See #766)
0.1.0#
This is the initial release of @urql/exchange-persisted-fetch which adds Persisted Queries
support, and is an exchange that can be used alongside the default fetchExchange or
@urql/exchange-multipart-fetch.
It's still experimental, just like @urql/exchange-multipart-fetch, so please test it with care and
report any bugs you find.