@gambalabs/apollo 6.0.0-alpha.33 → 6.0.0-alpha.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugin.mjs +3 -2
- package/dist/runtime/pusher.mjs +1 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { useLogger, defineNuxtModule, createResolver, addTemplate, addPlugin, ad
|
|
|
5
5
|
import GraphQLPlugin from '@rollup/plugin-graphql';
|
|
6
6
|
|
|
7
7
|
const name = "@gambalabs/apollo";
|
|
8
|
-
const version = "6.0.0-alpha.
|
|
8
|
+
const version = "6.0.0-alpha.36";
|
|
9
9
|
|
|
10
10
|
const serializeConfig = (obj) => {
|
|
11
11
|
if (typeof obj === "function") {
|
package/dist/runtime/plugin.mjs
CHANGED
|
@@ -180,9 +180,10 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
180
180
|
pusherLink,
|
|
181
181
|
...clientConfig.persistedQueries ? [
|
|
182
182
|
split(
|
|
183
|
-
({ query }) => {
|
|
183
|
+
({ query, getContext }) => {
|
|
184
184
|
const definition = getMainDefinition(query);
|
|
185
|
-
|
|
185
|
+
const context = getContext();
|
|
186
|
+
return definition.kind === "OperationDefinition" && definition.operation === "query" && !context.unpersisted;
|
|
186
187
|
},
|
|
187
188
|
ApolloLink.from([persistedLink, retryLink, httpEndLink]),
|
|
188
189
|
ApolloLink.from([retryLink, httpEndLink])
|
package/dist/runtime/pusher.mjs
CHANGED
|
@@ -34,6 +34,7 @@ class PusherLink extends ApolloLink {
|
|
|
34
34
|
const { channel, event } = operation.getContext()
|
|
35
35
|
|
|
36
36
|
if (isSubscription && channel) {
|
|
37
|
+
subscriptionChannel = channel
|
|
37
38
|
this.subscribeToChannel(toValue(channel), event || 'lighthouse-subscription', observer)
|
|
38
39
|
} else {
|
|
39
40
|
forward(operation).subscribe({
|