You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The defaultOptions configuration is not functioning as expected when setting up the Apollo Client. Specifically, the fetchPolicy defined under defaultOptions.query is not being honored.
Apollo Client Version: @apollo/client 3.8.9
`ApolloClientFactory.apolloClient = new ApolloClient({
cache: new InMemoryCache(),
link: ApolloLink.from([
createMiddlewareContextLink(options?.middlewareContextLinkOptions),
...
]),
Issue Description
The defaultOptions configuration is not functioning as expected when setting up the Apollo Client. Specifically, the fetchPolicy defined under defaultOptions.query is not being honored.
Apollo Client Version: @apollo/client 3.8.9
`ApolloClientFactory.apolloClient = new ApolloClient({
cache: new InMemoryCache(),
link: ApolloLink.from([
createMiddlewareContextLink(options?.middlewareContextLinkOptions),
...
]),
defaultOptions: {
query: { fetchPolicy: 'no-cache' },
},
ssrMode: !isBrowser(),
});`
Link to Reproduction
none
Reproduction Steps
defaultOptions
is not working for mutation hooks generated by apollo client.fetch-policy
in the useCustomHookQuery({...,
fetchPolicy: "no-cache"
}).
this works, but I think I don't think I need to set this explicitly. Anyone facing similar issue?
@apollo/client
version3.8.9
The text was updated successfully, but these errors were encountered: