@urql/core
Advanced tools
Comparing version 1.15.1 to 1.15.2
# @urql/core | ||
## 1.15.2 | ||
### Patch Changes | ||
- Don't add `undefined` to any property of the `ssrExchange`'s serialized results, as this would crash in Next.js, by [@JoviDeCroock](https://github.com/JoviDeCroock) (See [#1168](https://github.com/FormidableLabs/urql/pull/1168)) | ||
## 1.15.1 | ||
@@ -4,0 +10,0 @@ |
@@ -144,12 +144,10 @@ "use strict"; | ||
}, serializeResult = function(a) { | ||
var b = a.error; | ||
a = { | ||
data: JSON.stringify(a.data), | ||
error: void 0 | ||
}; | ||
b && (a.error = { | ||
graphQLErrors: b.graphQLErrors.map(_ref), | ||
networkError: b.networkError ? "" + b.networkError : void 0 | ||
}); | ||
return a; | ||
var c, b = a.data; | ||
a = a.error; | ||
c = {}; | ||
void 0 !== b && (c.data = JSON.stringify(b)); | ||
a && (c.error = { | ||
graphQLErrors: a.graphQLErrors.map(_ref) | ||
}, a.networkError && (c.error.networkError = "" + a.networkError)); | ||
return c; | ||
}, deserializeResult = function(a, b) { | ||
@@ -156,0 +154,0 @@ var c = b.error; |
@@ -1,2 +0,2 @@ | ||
"use strict";var e=require("./de338699.min.js"),t=require("wonka"),r=require("graphql"),n=function(e,t){if(void 0===t&&(t=[]),Array.isArray(e))e.forEach((function(e){n(e,t)}));else if("object"==typeof e&&null!==e)for(var r in e)"__typename"===r&&"string"==typeof e[r]?t.push(e[r]):n(e[r],t);return t};function o(e,t,r){return r.indexOf(e)===t}var i=function(e){return n(e).filter(o)};function u(e){return e.kind===r.Kind.FIELD&&"__typename"===e.name.value}var a=function(t){if(t.selectionSet&&!t.selectionSet.selections.some(u))return e._extends({},t,{selectionSet:e._extends({},t.selectionSet,{selections:t.selectionSet.selections.concat([{kind:r.Kind.FIELD,name:{kind:r.Kind.NAME,value:"__typename"}}])})})},c=function(e){var t=r.visit(e,{Field:a,InlineFragment:a});return t.__key=e.__key,t},s=function(e){return e&&"object"==typeof e?Object.keys(e).reduce((function(t,r){var n=e[r];return"__typename"===r?Object.defineProperty(t,"__typename",{enumerable:!1,value:n}):t[r]=Array.isArray(n)?n.map(s):n&&"object"==typeof n&&"__typename"in n?s(n):n,t}),{}):e};function f(e){return e.toPromise=function(){return t.toPromise(t.take(1)(e))},e}function p(e,t,r){return r||(r=t.context),{key:t.key,query:t.query,variables:t.variables,kind:e,context:r,get operationName(){return this.kind}}}var l=function(t,r){return p(t.kind,t,e._extends({},t.context,{meta:e._extends({},t.context.meta,r)}))},d=function(){},h=function(e){return"subscription"!==(e=e.kind)&&"query"!==e};function y(e){return e.path||e.extensions?{message:e.message,path:e.path,extensions:e.extensions}:e.message}var k=function(e){return"mutation"!==(e=e.kind)&&"query"!==e};function m(e){var t=p(e.kind,e);return t.query=c(e.query),t}function x(e){return"query"!==e.kind||"cache-only"!==e.context.requestPolicy}function v(e){return l(e,{cacheOutcome:"miss"})}function q(e){return k(e)}var g=function(r){function n(t){var r=s.get(t.key);return r=e._extends({},r,{operation:l(t,{cacheOutcome:r?"hit":"miss"})}),"cache-and-network"===t.context.requestPolicy&&(r.stale=!0,O(c,t)),r}function o(e){return!k(e)&&y(e)}function i(e){e.operation&&"mutation"===e.operation.kind?d(e):e.operation&&"query"===e.operation.kind&&h(e)}function u(e){return!k(e)&&!y(e)}var a=r.forward,c=r.client;r=r.dispatchDebug;var s=new Map,f=Object.create(null),p=m,d=b(s,f,c,r),h=E(s,f),y=function(e){var t=e.context.requestPolicy;return"query"===e.kind&&"network-only"!==t&&("cache-only"===t||s.has(e.key))};return function(e){var r=t.share(e);return e=t.map(n)(t.filter(o)(r)),r=t.tap(i)(a(t.filter(x)(t.map(v)(t.merge([t.map(p)(t.filter(u)(r)),t.filter(q)(r)]))))),t.merge([e,r])}},O=function(t,r){return t.reexecuteOperation(p(r.kind,r,e._extends({},r.context,{requestPolicy:"network-only"})))},b=function(e,t,r,n){function o(t){if(e.has(t)){var n=e.get(t).operation;e.delete(t),O(r,n)}}return function(e){function r(e){n.add(e)}var n=new Set,u=e.operation.context.additionalTypenames;(e=i(e.data).concat(u||[])).forEach((function(e){(e=t[e]||(t[e]=new Set)).forEach(r),e.clear()})),n.forEach(o)}},E=function(e,t){return function(r){var n=r.operation,o=r.data,u=n.context.additionalTypenames;null!=o&&(e.set(n.key,{operation:n,data:o,error:r.error}),i(r.data).concat(u||[]).forEach((function(e){(t[e]||(t[e]=new Set)).add(n.key)})))}},w=function(e){var r=e.forward,n=new Set,o=function(e){var t=e.key;return"teardown"===(e=e.kind)?(n.delete(t),!0):"query"!==e&&"subscription"!==e||(e=n.has(t),n.add(t),!e)},i=function(e){n.delete(e.operation.key)};return function(e){return e=t.filter(o)(e),t.tap(i)(r(e))}};function _(e){return"query"===e.kind||"mutation"===e.kind}function S(e){return"query"!==e.kind&&"mutation"!==e.kind}var R=function(r){var n=r.forward;return function(r){var o=t.share(r);r=t.mergeMap((function(r){var n=r.key,i=t.filter((function(e){return"teardown"===e.kind&&e.key===n}))(o),u=e.makeFetchBody(r),a=e.makeFetchURL(r,u);return u=e.makeFetchOptions(r,u),t.onPush((function(e){}))(t.takeUntil(i)(e.makeFetchSource(r,a,u)))}))(t.filter(_)(o));var i=n(t.filter(S)(o));return t.merge([r,i])}};function P(){return!1}var M=function(e){function r(e){}return function(e){return t.filter(P)(t.tap(r)(e))}},Q=M(),j=function(e){return function(t){var r=t.client;return e.reduceRight((function(e,t){return t({client:r,forward:e,dispatchDebug:function(e){}})}),t.forward)}},C=[w,g,R],D=function(r){var n=this;this.activeOperations=Object.create(null),this.queue=[],this.createOperationContext=function(t){return t||(t={}),e._extends({},{url:n.url,fetchOptions:n.fetchOptions,fetch:n.fetch,preferGetMethod:n.preferGetMethod},t,{suspense:t.suspense||!1!==t.suspense&&n.suspense,requestPolicy:t.requestPolicy||n.requestPolicy})},this.createRequestOperation=function(e,t,r){return p(e,t,n.createOperationContext(r))},this.executeQuery=function(e,t){return e=n.createRequestOperation("query",e,t),n.executeRequestOperation(e)},this.executeSubscription=function(e,t){return e=n.createRequestOperation("subscription",e,t),n.executeRequestOperation(e)},this.executeMutation=function(e,t){return e=n.createRequestOperation("mutation",e,t),n.executeRequestOperation(e)};var o=d;this.url=r.url,this.fetchOptions=r.fetchOptions,this.fetch=r.fetch,this.suspense=!!r.suspense,this.requestPolicy=r.requestPolicy||"cache-first",this.preferGetMethod=!!r.preferGetMethod,this.maskTypename=!!r.maskTypename;var i=t.makeSubject(),u=i.next;this.operations$=i.source;var a=!1;this.dispatchOperation=function(e){for(a=!0,e&&u(e);e=n.queue.shift();)u(e);a=!1},this.reexecuteOperation=function(e){("mutation"===e.kind||0<(n.activeOperations[e.key]||0))&&(n.queue.push(e),a||Promise.resolve().then(n.dispatchOperation))},r=j(void 0!==r.exchanges?r.exchanges:C),this.results$=t.share(r({client:this,dispatchDebug:o,forward:M()})(this.operations$)),t.publish(this.results$)};function L(e){return e.data=s(e.data),e}D.prototype.onOperationStart=function(e){var t=e.key;this.activeOperations[t]=(this.activeOperations[t]||0)+1,this.dispatchOperation(e)},D.prototype.onOperationEnd=function(e){var t=e.key,r=this.activeOperations[t]||0;if(0>=(this.activeOperations[t]=0>=r?0:r-1)){for(t=this.queue.length-1;0<=t;t--)this.queue[t].key===e.key&&this.queue.splice(t,1);this.dispatchOperation(p("teardown",e,e.context))}},D.prototype.executeRequestOperation=function(e){var r=this,n=t.filter((function(t){return t.operation.key===e.key}))(this.results$);if(this.maskTypename&&(n=t.map(L)(n)),"mutation"===e.kind)return t.take(1)(t.onStart((function(){return r.dispatchOperation(e)}))(n));var o=t.filter((function(t){return"teardown"===t.kind&&t.key===e.key}))(this.operations$),i=t.onEnd((function(){r.onOperationEnd(e)}))(t.onStart((function(){r.onOperationStart(e)}))(t.takeUntil(o)(n)));return"query"===e.kind&&e.context.pollInterval?t.switchMap((function(){return i}))(t.merge([t.fromValue(0),t.interval(e.context.pollInterval)])):i},D.prototype.query=function(t,r,n){return n&&"boolean"==typeof n.suspense||(n=e._extends({},n,{suspense:!1})),f(this.executeQuery(e.createRequest(t,r),n))},D.prototype.readQuery=function(r,n,o){var i=null;return t.subscribe((function(e){i=e}))(this.executeQuery(e.createRequest(r,n),o)).unsubscribe(),i},D.prototype.subscription=function(t,r,n){return this.executeSubscription(e.createRequest(t,r),n)},D.prototype.mutation=function(t,r,n){return f(this.executeMutation(e.createRequest(t,r),n))},exports.CombinedError=e.CombinedError,exports.createRequest=e.createRequest,exports.getOperationName=e.getOperationName,exports.makeErrorResult=e.makeErrorResult,exports.makeResult=e.makeResult,exports.stringifyVariables=e.stringifyVariables,exports.Client=D,exports.cacheExchange=g,exports.composeExchanges=j,exports.createClient=function(e){return new D(e)},exports.debugExchange=function(e){var t=e.forward;return function(e){return t(e)}},exports.dedupExchange=w,exports.defaultExchanges=C,exports.errorExchange=function(e){function r(e){var t=e.error;e=e.operation,t&&n(t,e)}var n=e.onError;return function(e){var n=e.forward;return function(e){return t.tap(r)(n(e))}}},exports.fallbackExchangeIO=Q,exports.fetchExchange=R,exports.formatDocument=c,exports.makeOperation=p,exports.maskTypename=s,exports.ssrExchange=function(r){function n(){for(var e;e=s.shift();)delete c[e]}function o(e){return!p(e)}function i(t){return function(t,r){var n=r.error;return{operation:t,data:(r=r.data)?JSON.parse(r):void 0,extensions:void 0,error:n?new e.CombinedError({networkError:n.networkError?Error(n.networkError):void 0,graphQLErrors:n.graphQLErrors&&n.graphQLErrors.length?n.graphQLErrors:void 0}):void 0}}(t,c[t.key])}function u(e){return p(e)}function a(e){var t=e.operation;h(t)||(e=function(e){var t=e.error;return e={data:JSON.stringify(e.data),error:void 0},t&&(e.error={graphQLErrors:t.graphQLErrors.map(y),networkError:t.networkError?""+t.networkError:void 0}),e}(e),c[t.key]=e)}var c={},s=[],f=function(e){s.push(e.operation.key),1===s.length&&Promise.resolve().then(n)},p=function(e){return!h(e)&&void 0!==c[e.key]},l=function(e){var n=e.client,c=e.forward;return function(e){var s=r&&"boolean"==typeof r.isClient?!!r.isClient:!n.suspense,p=t.share(e);return e=c(t.filter(o)(p)),p=t.map(i)(t.filter(u)(p)),s?p=t.tap(f)(p):e=t.tap(a)(e),t.merge([e,p])}};return l.restoreData=function(t){return e._extends(c,t)},l.extractData=function(){return e._extends({},c)},r&&r.initialState&&l.restoreData(r.initialState),l},exports.subscriptionExchange=function(n){function o(e){return"subscription"===(e=e.kind)||!!u&&("query"===e||"mutation"===e)}var i=n.forwardSubscription,u=n.enableAllOperations;return function(n){function u(e){return!f(e)}var a=n.client,c=n.forward,s=function(n){var o=i({key:n.key.toString(36),query:r.print(n.query),variables:n.variables,context:e._extends({},n.context)});return t.make((function(t){function r(t){return s(e.makeResult(n,t))}function i(t){return s(e.makeErrorResult(n,t))}function u(){l||(l=!0,"subscription"===n.kind&&a.reexecuteOperation(p("teardown",n,n.context)),f())}var c,s=t.next,f=t.complete,l=!1;return Promise.resolve().then((function(){l||(c=o.subscribe({next:r,error:i,complete:u}))})),function(){l=!0,c&&c.unsubscribe()}}))},f=o;return function(e){var r=t.share(e);e=t.mergeMap((function(e){var n=e.key,o=t.filter((function(e){return"teardown"===e.kind&&e.key===n}))(r);return t.takeUntil(o)(s(e))}))(t.filter(f)(r));var n=c(t.filter(u)(r));return t.merge([e,n])}}}; | ||
"use strict";var e=require("./de338699.min.js"),t=require("wonka"),r=require("graphql"),n=function(e,t){if(void 0===t&&(t=[]),Array.isArray(e))e.forEach((function(e){n(e,t)}));else if("object"==typeof e&&null!==e)for(var r in e)"__typename"===r&&"string"==typeof e[r]?t.push(e[r]):n(e[r],t);return t};function o(e,t,r){return r.indexOf(e)===t}var i=function(e){return n(e).filter(o)};function u(e){return e.kind===r.Kind.FIELD&&"__typename"===e.name.value}var a=function(t){if(t.selectionSet&&!t.selectionSet.selections.some(u))return e._extends({},t,{selectionSet:e._extends({},t.selectionSet,{selections:t.selectionSet.selections.concat([{kind:r.Kind.FIELD,name:{kind:r.Kind.NAME,value:"__typename"}}])})})},c=function(e){var t=r.visit(e,{Field:a,InlineFragment:a});return t.__key=e.__key,t},s=function(e){return e&&"object"==typeof e?Object.keys(e).reduce((function(t,r){var n=e[r];return"__typename"===r?Object.defineProperty(t,"__typename",{enumerable:!1,value:n}):t[r]=Array.isArray(n)?n.map(s):n&&"object"==typeof n&&"__typename"in n?s(n):n,t}),{}):e};function f(e){return e.toPromise=function(){return t.toPromise(t.take(1)(e))},e}function p(e,t,r){return r||(r=t.context),{key:t.key,query:t.query,variables:t.variables,kind:e,context:r,get operationName(){return this.kind}}}var l=function(t,r){return p(t.kind,t,e._extends({},t.context,{meta:e._extends({},t.context.meta,r)}))},h=function(){},d=function(e){return"subscription"!==(e=e.kind)&&"query"!==e};function y(e){return e.path||e.extensions?{message:e.message,path:e.path,extensions:e.extensions}:e.message}var k=function(e){return"mutation"!==(e=e.kind)&&"query"!==e};function m(e){var t=p(e.kind,e);return t.query=c(e.query),t}function x(e){return"query"!==e.kind||"cache-only"!==e.context.requestPolicy}function v(e){return l(e,{cacheOutcome:"miss"})}function q(e){return k(e)}var g=function(r){function n(t){var r=s.get(t.key);return r=e._extends({},r,{operation:l(t,{cacheOutcome:r?"hit":"miss"})}),"cache-and-network"===t.context.requestPolicy&&(r.stale=!0,O(c,t)),r}function o(e){return!k(e)&&y(e)}function i(e){e.operation&&"mutation"===e.operation.kind?h(e):e.operation&&"query"===e.operation.kind&&d(e)}function u(e){return!k(e)&&!y(e)}var a=r.forward,c=r.client;r=r.dispatchDebug;var s=new Map,f=Object.create(null),p=m,h=b(s,f,c,r),d=E(s,f),y=function(e){var t=e.context.requestPolicy;return"query"===e.kind&&"network-only"!==t&&("cache-only"===t||s.has(e.key))};return function(e){var r=t.share(e);return e=t.map(n)(t.filter(o)(r)),r=t.tap(i)(a(t.filter(x)(t.map(v)(t.merge([t.map(p)(t.filter(u)(r)),t.filter(q)(r)]))))),t.merge([e,r])}},O=function(t,r){return t.reexecuteOperation(p(r.kind,r,e._extends({},r.context,{requestPolicy:"network-only"})))},b=function(e,t,r,n){function o(t){if(e.has(t)){var n=e.get(t).operation;e.delete(t),O(r,n)}}return function(e){function r(e){n.add(e)}var n=new Set,u=e.operation.context.additionalTypenames;(e=i(e.data).concat(u||[])).forEach((function(e){(e=t[e]||(t[e]=new Set)).forEach(r),e.clear()})),n.forEach(o)}},E=function(e,t){return function(r){var n=r.operation,o=r.data,u=n.context.additionalTypenames;null!=o&&(e.set(n.key,{operation:n,data:o,error:r.error}),i(r.data).concat(u||[]).forEach((function(e){(t[e]||(t[e]=new Set)).add(n.key)})))}},w=function(e){var r=e.forward,n=new Set,o=function(e){var t=e.key;return"teardown"===(e=e.kind)?(n.delete(t),!0):"query"!==e&&"subscription"!==e||(e=n.has(t),n.add(t),!e)},i=function(e){n.delete(e.operation.key)};return function(e){return e=t.filter(o)(e),t.tap(i)(r(e))}};function _(e){return"query"===e.kind||"mutation"===e.kind}function S(e){return"query"!==e.kind&&"mutation"!==e.kind}var R=function(r){var n=r.forward;return function(r){var o=t.share(r);r=t.mergeMap((function(r){var n=r.key,i=t.filter((function(e){return"teardown"===e.kind&&e.key===n}))(o),u=e.makeFetchBody(r),a=e.makeFetchURL(r,u);return u=e.makeFetchOptions(r,u),t.onPush((function(e){}))(t.takeUntil(i)(e.makeFetchSource(r,a,u)))}))(t.filter(_)(o));var i=n(t.filter(S)(o));return t.merge([r,i])}};function P(){return!1}var M=function(e){function r(e){}return function(e){return t.filter(P)(t.tap(r)(e))}},Q=M(),j=function(e){return function(t){var r=t.client;return e.reduceRight((function(e,t){return t({client:r,forward:e,dispatchDebug:function(e){}})}),t.forward)}},C=[w,g,R],D=function(r){var n=this;this.activeOperations=Object.create(null),this.queue=[],this.createOperationContext=function(t){return t||(t={}),e._extends({},{url:n.url,fetchOptions:n.fetchOptions,fetch:n.fetch,preferGetMethod:n.preferGetMethod},t,{suspense:t.suspense||!1!==t.suspense&&n.suspense,requestPolicy:t.requestPolicy||n.requestPolicy})},this.createRequestOperation=function(e,t,r){return p(e,t,n.createOperationContext(r))},this.executeQuery=function(e,t){return e=n.createRequestOperation("query",e,t),n.executeRequestOperation(e)},this.executeSubscription=function(e,t){return e=n.createRequestOperation("subscription",e,t),n.executeRequestOperation(e)},this.executeMutation=function(e,t){return e=n.createRequestOperation("mutation",e,t),n.executeRequestOperation(e)};var o=h;this.url=r.url,this.fetchOptions=r.fetchOptions,this.fetch=r.fetch,this.suspense=!!r.suspense,this.requestPolicy=r.requestPolicy||"cache-first",this.preferGetMethod=!!r.preferGetMethod,this.maskTypename=!!r.maskTypename;var i=t.makeSubject(),u=i.next;this.operations$=i.source;var a=!1;this.dispatchOperation=function(e){for(a=!0,e&&u(e);e=n.queue.shift();)u(e);a=!1},this.reexecuteOperation=function(e){("mutation"===e.kind||0<(n.activeOperations[e.key]||0))&&(n.queue.push(e),a||Promise.resolve().then(n.dispatchOperation))},r=j(void 0!==r.exchanges?r.exchanges:C),this.results$=t.share(r({client:this,dispatchDebug:o,forward:M()})(this.operations$)),t.publish(this.results$)};function L(e){return e.data=s(e.data),e}D.prototype.onOperationStart=function(e){var t=e.key;this.activeOperations[t]=(this.activeOperations[t]||0)+1,this.dispatchOperation(e)},D.prototype.onOperationEnd=function(e){var t=e.key,r=this.activeOperations[t]||0;if(0>=(this.activeOperations[t]=0>=r?0:r-1)){for(t=this.queue.length-1;0<=t;t--)this.queue[t].key===e.key&&this.queue.splice(t,1);this.dispatchOperation(p("teardown",e,e.context))}},D.prototype.executeRequestOperation=function(e){var r=this,n=t.filter((function(t){return t.operation.key===e.key}))(this.results$);if(this.maskTypename&&(n=t.map(L)(n)),"mutation"===e.kind)return t.take(1)(t.onStart((function(){return r.dispatchOperation(e)}))(n));var o=t.filter((function(t){return"teardown"===t.kind&&t.key===e.key}))(this.operations$),i=t.onEnd((function(){r.onOperationEnd(e)}))(t.onStart((function(){r.onOperationStart(e)}))(t.takeUntil(o)(n)));return"query"===e.kind&&e.context.pollInterval?t.switchMap((function(){return i}))(t.merge([t.fromValue(0),t.interval(e.context.pollInterval)])):i},D.prototype.query=function(t,r,n){return n&&"boolean"==typeof n.suspense||(n=e._extends({},n,{suspense:!1})),f(this.executeQuery(e.createRequest(t,r),n))},D.prototype.readQuery=function(r,n,o){var i=null;return t.subscribe((function(e){i=e}))(this.executeQuery(e.createRequest(r,n),o)).unsubscribe(),i},D.prototype.subscription=function(t,r,n){return this.executeSubscription(e.createRequest(t,r),n)},D.prototype.mutation=function(t,r,n){return f(this.executeMutation(e.createRequest(t,r),n))},exports.CombinedError=e.CombinedError,exports.createRequest=e.createRequest,exports.getOperationName=e.getOperationName,exports.makeErrorResult=e.makeErrorResult,exports.makeResult=e.makeResult,exports.stringifyVariables=e.stringifyVariables,exports.Client=D,exports.cacheExchange=g,exports.composeExchanges=j,exports.createClient=function(e){return new D(e)},exports.debugExchange=function(e){var t=e.forward;return function(e){return t(e)}},exports.dedupExchange=w,exports.defaultExchanges=C,exports.errorExchange=function(e){function r(e){var t=e.error;e=e.operation,t&&n(t,e)}var n=e.onError;return function(e){var n=e.forward;return function(e){return t.tap(r)(n(e))}}},exports.fallbackExchangeIO=Q,exports.fetchExchange=R,exports.formatDocument=c,exports.makeOperation=p,exports.maskTypename=s,exports.ssrExchange=function(r){function n(){for(var e;e=s.shift();)delete c[e]}function o(e){return!p(e)}function i(t){return function(t,r){var n=r.error;return{operation:t,data:(r=r.data)?JSON.parse(r):void 0,extensions:void 0,error:n?new e.CombinedError({networkError:n.networkError?Error(n.networkError):void 0,graphQLErrors:n.graphQLErrors&&n.graphQLErrors.length?n.graphQLErrors:void 0}):void 0}}(t,c[t.key])}function u(e){return p(e)}function a(e){var t=e.operation;d(t)||(e=function(e){var t=e.data;e=e.error;var r={};return void 0!==t&&(r.data=JSON.stringify(t)),e&&(r.error={graphQLErrors:e.graphQLErrors.map(y)},e.networkError&&(r.error.networkError=""+e.networkError)),r}(e),c[t.key]=e)}var c={},s=[],f=function(e){s.push(e.operation.key),1===s.length&&Promise.resolve().then(n)},p=function(e){return!d(e)&&void 0!==c[e.key]},l=function(e){var n=e.client,c=e.forward;return function(e){var s=r&&"boolean"==typeof r.isClient?!!r.isClient:!n.suspense,p=t.share(e);return e=c(t.filter(o)(p)),p=t.map(i)(t.filter(u)(p)),s?p=t.tap(f)(p):e=t.tap(a)(e),t.merge([e,p])}};return l.restoreData=function(t){return e._extends(c,t)},l.extractData=function(){return e._extends({},c)},r&&r.initialState&&l.restoreData(r.initialState),l},exports.subscriptionExchange=function(n){function o(e){return"subscription"===(e=e.kind)||!!u&&("query"===e||"mutation"===e)}var i=n.forwardSubscription,u=n.enableAllOperations;return function(n){function u(e){return!f(e)}var a=n.client,c=n.forward,s=function(n){var o=i({key:n.key.toString(36),query:r.print(n.query),variables:n.variables,context:e._extends({},n.context)});return t.make((function(t){function r(t){return s(e.makeResult(n,t))}function i(t){return s(e.makeErrorResult(n,t))}function u(){l||(l=!0,"subscription"===n.kind&&a.reexecuteOperation(p("teardown",n,n.context)),f())}var c,s=t.next,f=t.complete,l=!1;return Promise.resolve().then((function(){l||(c=o.subscribe({next:r,error:i,complete:u}))})),function(){l=!0,c&&c.unsubscribe()}}))},f=o;return function(e){var r=t.share(e);e=t.mergeMap((function(e){var n=e.key,o=t.filter((function(e){return"teardown"===e.kind&&e.key===n}))(r);return t.takeUntil(o)(s(e))}))(t.filter(f)(r));var n=c(t.filter(u)(r));return t.merge([e,n])}}}; | ||
//# sourceMappingURL=urql-core.min.js.map |
{ | ||
"name": "@urql/core", | ||
"version": "1.15.1", | ||
"version": "1.15.2", | ||
"description": "The shared core for the highly customizable and versatile GraphQL client", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
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
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
316641
2097