@urql/exchange-auth
Advanced tools
Comparing version 0.1.1 to 0.1.2
# Changelog | ||
## 0.1.2 | ||
### Patch Changes | ||
- Deprecate the `Operation.operationName` property in favor of `Operation.kind`. This name was | ||
previously confusing as `operationName` was 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** all `urql` packages you use. If you have custom exchanges that spread operations, please | ||
use [the new `makeOperation` helper | ||
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)) | ||
- Updated dependencies (See [#1094](https://github.com/FormidableLabs/urql/pull/1094) and [#1045](https://github.com/FormidableLabs/urql/pull/1045)) | ||
- @urql/core@1.14.0 | ||
## 0.1.1 | ||
@@ -4,0 +17,0 @@ |
@@ -17,15 +17,13 @@ "use strict"; | ||
function _ref2(a) { | ||
return "teardown" === a.operationName; | ||
return "teardown" === a.kind; | ||
} | ||
function _ref3(a) { | ||
return "teardown" !== a.operationName; | ||
return "teardown" !== a.kind; | ||
} | ||
var wonka = require("wonka"), core = require("@urql/core"), addAuthAttemptToOperation = function(a, b) { | ||
return _extends({}, a, { | ||
context: _extends({}, a.context, { | ||
authAttempt: b | ||
}) | ||
}); | ||
return core.makeOperation(a.kind, a, _extends({}, a.context, { | ||
authAttempt: b | ||
})); | ||
}; | ||
@@ -89,3 +87,3 @@ | ||
var b = wonka.filter((function(b) { | ||
return "teardown" === b.operationName && b.key === a.key; | ||
return "teardown" === b.kind && b.key === a.key; | ||
}))(k); | ||
@@ -92,0 +90,0 @@ return wonka.takeUntil(b)(wonka.map((function() { |
{ | ||
"name": "@urql/exchange-auth", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "An exchange for managing authentication and token refresh in urql", | ||
@@ -54,3 +54,3 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@urql/core": ">=1.12.0", | ||
"@urql/core": ">=1.14.0", | ||
"wonka": "^4.0.14" | ||
@@ -62,3 +62,3 @@ }, | ||
"devDependencies": { | ||
"graphql": "^15.1.0", | ||
"graphql": "^15.4.0", | ||
"graphql-tag": "^2.10.1" | ||
@@ -65,0 +65,0 @@ }, |
@@ -21,2 +21,3 @@ <h2 align="center">@urql/exchange-auth</h2> | ||
import { createClient, dedupExchange, cacheExchange, fetchExchange } from 'urql'; | ||
import { makeOperation } from '@urql/core'; | ||
import { authExchange } from '@urql/exchange-auth'; | ||
@@ -45,5 +46,6 @@ | ||
return { | ||
...operation, | ||
context: { | ||
return makeOperation( | ||
operation.kind, | ||
operation, | ||
{ | ||
...operation.context, | ||
@@ -58,3 +60,3 @@ fetchOptions: { | ||
}, | ||
}; | ||
); | ||
}, | ||
@@ -61,0 +63,0 @@ willAuthError: ({ authState }) => { |
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
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1
142
28617
10
228
Updated@urql/core@>=1.14.0