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
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
Hi!
I want to use the client of react-apollo to reset part of the cache from a key or query, not clean the entirely cache using the client.resetStore().
Example:
import { withApollo } from "react-apollo";
import { compose } from "recompose";
import MyComponent from "./MyComponent";
const cleanEspecificCache = ({ client }) => () =>{
// What i do here?
}
const enhance = compose(
withApollo,
withHandlers({cleanEspecificCache})
)
export default enhance(MyComponent);
What i do to make it works? Thanks!
The text was updated successfully, but these errors were encountered:
A simple way to reset the cache for a specific query is to call the query again with fetchPolicy: 'network-only'. GraphQL fetches data from API and updates the cache after results are received.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi!
I want to use the client of react-apollo to reset part of the cache from a key or query, not clean the entirely cache using the client.resetStore().
Example:
What i do to make it works? Thanks!
The text was updated successfully, but these errors were encountered: