@grapes-agency/apollo-link-webworker
Advanced tools
Comparing version 1.0.0-alpha.6 to 1.0.0-alpha.7
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.0.0-alpha.7](https://github.com/grapes-agency/graphql/compare/@grapes-agency/apollo-link-webworker@1.0.0-alpha.6...@grapes-agency/apollo-link-webworker@1.0.0-alpha.7) (2021-08-18) | ||
### Bug Fixes | ||
* **apollo-link-webworker:** Convert GraphQLErrors in plain JSON before transfer ([d3f94c7](https://github.com/grapes-agency/graphql/commit/d3f94c77137d69da9008793834371e9b34e8a18e)) | ||
# [1.0.0-alpha.6](https://github.com/grapes-agency/graphql/compare/@grapes-agency/apollo-link-webworker@1.0.0-alpha.5...@grapes-agency/apollo-link-webworker@1.0.0-alpha.6) (2021-08-18) | ||
@@ -8,0 +19,0 @@ |
@@ -32,2 +32,4 @@ 'use strict'; | ||
// eslint-disable-next-line handle-callback-err | ||
const objectifyError = (error) => Object.fromEntries(Object.getOwnPropertyNames(error).map(propertyName => [propertyName, error[propertyName]])); | ||
Comlink__namespace.transferHandlers.set('OBSERVABLE', { | ||
@@ -45,3 +47,3 @@ canHandle: (obj) => obj instanceof client.Observable, | ||
const subscription = observable.subscribe({ | ||
next: (next) => port.postMessage({ next }), | ||
next: next => { var _a; return port.postMessage({ next: Object.assign(Object.assign({}, next), { errors: ((_a = next.errors) === null || _a === void 0 ? void 0 : _a.map(objectifyError)) || undefined }) }); }, | ||
error: (error) => port.postMessage({ error }), | ||
@@ -48,0 +50,0 @@ complete: () => port.postMessage({ complete: true }), |
@@ -5,2 +5,4 @@ import { Observable } from '@apollo/client'; | ||
// eslint-disable-next-line handle-callback-err | ||
const objectifyError = (error) => Object.fromEntries(Object.getOwnPropertyNames(error).map(propertyName => [propertyName, error[propertyName]])); | ||
Comlink.transferHandlers.set('OBSERVABLE', { | ||
@@ -18,3 +20,3 @@ canHandle: (obj) => obj instanceof Observable, | ||
const subscription = observable.subscribe({ | ||
next: (next) => port.postMessage({ next }), | ||
next: next => { var _a; return port.postMessage({ next: Object.assign(Object.assign({}, next), { errors: ((_a = next.errors) === null || _a === void 0 ? void 0 : _a.map(objectifyError)) || undefined }) }); }, | ||
error: (error) => port.postMessage({ error }), | ||
@@ -21,0 +23,0 @@ complete: () => port.postMessage({ complete: true }), |
{ | ||
"name": "@grapes-agency/apollo-link-webworker", | ||
"version": "1.0.0-alpha.6", | ||
"version": "1.0.0-alpha.7", | ||
"description": "WebWorker for @apollo/client", | ||
@@ -25,3 +25,3 @@ "main": "./dist/index.cjs.js", | ||
}, | ||
"gitHead": "bd6d8b4f2eae00880b26bebe8b2ff2bf0a04ba3f" | ||
"gitHead": "0aa9731f1e54b6eca1e7102a2ac009ee5d7d9d28" | ||
} |
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
31256
399