@gambalabs/apollo 6.0.0-alpha.25 → 6.0.0-alpha.28
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 +3 -3
- package/dist/runtime/plugin.mjs +4 -3
- 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.28";
|
|
9
9
|
|
|
10
10
|
const serializeConfig = (obj) => {
|
|
11
11
|
if (typeof obj === "function") {
|
|
@@ -56,8 +56,8 @@ const module = defineNuxtModule({
|
|
|
56
56
|
},
|
|
57
57
|
attempts: {
|
|
58
58
|
max: 5,
|
|
59
|
-
retryIf(error, operation) {
|
|
60
|
-
return
|
|
59
|
+
retryIf: (error, operation) => {
|
|
60
|
+
return !!error;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}
|
package/dist/runtime/plugin.mjs
CHANGED
|
@@ -94,11 +94,12 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
94
94
|
persistedLink = createPersistedQueryLink({ sha256, useGETForHashedQueries: true });
|
|
95
95
|
}
|
|
96
96
|
const gambaFetch = async (uri, options) => {
|
|
97
|
-
let handledByTimeout = false;
|
|
98
97
|
const abortController = new AbortController();
|
|
99
98
|
const timer = setTimeout(() => {
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
abortController.abort({
|
|
100
|
+
message: `Request exceeded timeout ${clientConfig.requestMaxTimeout / 1e3} seconds`,
|
|
101
|
+
name: "timeout"
|
|
102
|
+
});
|
|
102
103
|
}, clientConfig.requestMaxTimeout);
|
|
103
104
|
return fetch(uri, {
|
|
104
105
|
...options,
|