@gambalabs/apollo 6.0.0-alpha.20 → 6.0.0-alpha.21
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 -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.21";
|
|
9
9
|
|
|
10
10
|
const serializeConfig = (obj) => {
|
|
11
11
|
if (typeof obj === "function") {
|
package/dist/runtime/plugin.mjs
CHANGED
|
@@ -101,6 +101,9 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
101
101
|
} else {
|
|
102
102
|
nuxtApp.callHook("apollo:error", { networkError: { bodyText: "Session Expired", statusCode: 419 } });
|
|
103
103
|
}
|
|
104
|
+
} else if (response.status > 300) {
|
|
105
|
+
const errorText = await response.text();
|
|
106
|
+
nuxtApp.callHook("apollo:error", { networkError: { bodyText: errorText, statusCode: response.status } });
|
|
104
107
|
}
|
|
105
108
|
return response;
|
|
106
109
|
};
|