piral-urql
Advanced tools
Comparing version 0.9.3 to 0.9.4
@@ -21,7 +21,7 @@ "use strict"; | ||
if (typeof header === 'object' && header) { | ||
return Object.assign({}, obj, header); | ||
return Object.assign(Object.assign({}, obj), header); | ||
} | ||
return obj; | ||
}, originalHeaders); | ||
return Object.assign({}, options, { headers }); | ||
return Object.assign(Object.assign({}, options), { headers }); | ||
}); | ||
@@ -28,0 +28,0 @@ } |
@@ -24,2 +24,2 @@ import { Client } from 'urql'; | ||
*/ | ||
export declare function gqlSubscription<TResult = any>(client: Client, q: string, subscriber: GqlSubscriber<TResult>, options?: GqlSubscriptionOptions): () => void; | ||
export declare function gqlSubscription<TResult = any>(client: Client, q: string, subscriber: GqlSubscriber<TResult>, options?: GqlSubscriptionOptions): (_1: void) => void; |
@@ -54,8 +54,8 @@ "use strict"; | ||
const response = client.executeSubscription(request, { fetchOptions: { headers } }); | ||
const [teardown] = wonka_1.pipe(response, wonka_1.subscribe(({ data, error }) => { | ||
const { unsubscribe } = wonka_1.pipe(response, wonka_1.subscribe(({ data, error }) => { | ||
subscriber(data, error); | ||
})); | ||
return teardown; | ||
return unsubscribe; | ||
} | ||
exports.gqlSubscription = gqlSubscription; | ||
//# sourceMappingURL=queries.js.map |
{ | ||
"name": "piral-urql", | ||
"version": "0.9.3", | ||
"version": "0.9.4", | ||
"description": "Plugin for providing a GraphQL client in Piral.", | ||
@@ -44,3 +44,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"piral-core": "^0.9.3" | ||
"piral-core": "^0.9.4" | ||
}, | ||
@@ -57,3 +57,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "a079ff637821eeacd28f1209593b778e370d0366" | ||
"gitHead": "2426a2466d490035811e382e871f1a019eae3513" | ||
} |
@@ -62,3 +62,3 @@ import { OperationResult, createRequest, Client } from 'urql'; | ||
const response = client.executeSubscription(request, { fetchOptions: { headers } }); | ||
const [teardown] = pipe( | ||
const { unsubscribe } = pipe( | ||
response, | ||
@@ -69,3 +69,3 @@ subscribe(({ data, error }) => { | ||
); | ||
return teardown; | ||
return unsubscribe; | ||
} |
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
33144