We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Darwin
v21.7.1
3.11.1
2.9.5
[email protected]
-
I'm using a custom fetch function in httpLinkOptions as detailed here: https://www.apollographql.com/docs/react/api/link/apollo-link-http/#customizing-fetch
httpLinkOptions
// nuxt.config.ts: import apolloConfig from './apollo-config'; export default defineNuxtConfig({ apollo: apolloConfig, modules: ['@nuxtjs/apollo'], });
// apollo-config.ts import fetch from 'isomorphic-fetch'; export default { clients: { default: { httpEndpoint: process.env.NUXT_DATOCMS_GRAPHQL_URL, httpLinkOptions: { headers: { Authorization: `Bearer ${process.env.NUXT_DATOCMS_TOKEN}`, }, fetch: (uri: string, options: any) => { const fetchBody = JSON.parse(options.body); // do some stuff to modify fetchBody options.body = JSON.stringify(fetchBody); return fetch(uri, options); }, }, }, }, };
// example.vue import sampleQuery from 'sample.gql'; const { data: sampleData, pending: sampleLoading, error: sampleError, } = useAsyncQuery(sampleQuery);
With this example, sampleError comes back with "_isomorphicFetch is not defined"
After a bit of digging, this is the NetworkError field on the error returned by Apollo: https://www.apollographql.com/docs/react/api/link/apollo-link-error#networkerror
I don't get any console or server errors.
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
Darwin
v21.7.1
3.11.1
3.11.1
2.9.5
[email protected]
-
-
-
-
Describe the bug
I'm using a custom fetch function in
httpLinkOptions
as detailed here: https://www.apollographql.com/docs/react/api/link/apollo-link-http/#customizing-fetchExpected behaviour
With this example, sampleError comes back with "_isomorphicFetch is not defined"
After a bit of digging, this is the NetworkError field on the error returned by Apollo: https://www.apollographql.com/docs/react/api/link/apollo-link-error#networkerror
I don't get any console or server errors.
Reproduction
No response
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: