react-apollo
react-apollo copied to clipboard
Clear fetch cache after creating new data
Hi, I'm trying to find the optimal fetch policy or something else, to clear the fetch cache after I create new records.
I have multiple dropdowns with names inside. I can search names in it (React Select) and I can add new names.
Currently, when I add a name in one dropdown, and search it in another dropdown, the useQuery hook returns the cache data rather than refetching it. So the new name can't be found.
Is there a way to clear the cache for this specific query, once I created a new name ?