@urql/exchange-persisted
Advanced tools
Comparing version 4.0.1 to 4.1.0-canary-889ca4db
# @urql/exchange-persisted-fetch | ||
## 4.1.0-canary-889ca4db | ||
### Minor Changes | ||
- 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 | ||
Submitted by [@kitten](https://github.com/kitten) (See [#3324](https://github.com/urql-graphql/urql/pull/3324)) | ||
### Patch Changes | ||
- Updated dependencies (See [#3317](https://github.com/urql-graphql/urql/pull/3317) and [#3308](https://github.com/urql-graphql/urql/pull/3308)) | ||
- @urql/core@4.1.0-canary-889ca4db | ||
## 4.0.1 | ||
@@ -4,0 +16,0 @@ |
@@ -42,2 +42,6 @@ import { OperationContext, TypedDocumentNode, Exchange } from '@urql/core'; | ||
* | ||
* If `generateHash` returns either `null` or `undefined`, the | ||
* operation will not be treated as a persisted operation, which | ||
* essentially skips this exchange’s logic for a given operation. | ||
* | ||
* Hint: The default SHA-256 function uses the WebCrypto API. This | ||
@@ -47,3 +51,3 @@ * API is unavailable on React Native, which may require you to | ||
*/ | ||
generateHash?(query: string, document: TypedDocumentNode<any, any>): Promise<string>; | ||
generateHash?(query: string, document: TypedDocumentNode<any, any>): Promise<string | undefined | null>; | ||
/** Enables persisted queries to be used for mutations. | ||
@@ -50,0 +54,0 @@ * |
{ | ||
"name": "@urql/exchange-persisted", | ||
"version": "4.0.1", | ||
"version": "4.1.0-canary-889ca4db", | ||
"description": "An exchange that allows for persisted queries support when fetching queries", | ||
@@ -41,3 +41,3 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@urql/core": ">=4.0.0", | ||
"@urql/core": "4.1.0-canary-889ca4db", | ||
"wonka": "^6.3.2" | ||
@@ -47,3 +47,3 @@ }, | ||
"graphql": "^16.0.0", | ||
"@urql/core": "4.0.11" | ||
"@urql/core": "4.1.0-canary-889ca4db" | ||
}, | ||
@@ -50,0 +50,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89982
341
2
+ Added@urql/core@4.1.0-canary-889ca4db(transitive)
- Removed@urql/core@5.1.0(transitive)