I'm using ApolloClient in my React app.
I have a GraphQL server running with Spring Boot.
I'm noticing an issue in that whenever my query options (as set in the variables
) are the same, it doesn't actually make the query/call the GraphQL server, instead it appears to be using results from the cache.
How do I go about forcing it to actually make the search as data may have changed?
Here is my service in which I make the call to the get
function in my front end - I'm hoping there is some option like forceRefetch: true
:
return graphQLClient
.query<MultipleSongsQueryResult>({
query: GET_SONGS,
variables: options,
})
.then(response => response.data);
Thanks.