react-apollo-hooks
react-apollo-hooks copied to clipboard
Global `fetchPolicy` has no effect
For example:
import { ApolloClient } from 'apollo-client'
const httpLink = createUploadLink({
uri: GRAPHQL_URL,
})
const cache = new InMemoryCache()
export const client = new ApolloClient({
link: ApolloLink.from([httpLink]),
cache,
defaultOptions: {
watchQuery: {
fetchPolicy: 'cache-and-network'
},
query: {
fetchPolicy: 'cache-and-network'
}
}
})
It does work when I set fetchPolicy for specific queries.