How to reset specific query result before (re)fetch #459
Unanswered
tillkolter
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I wonder if this question has been asked a hundred times before, but none of the threads I found matched my requirements. I have an apollo query which is dependent on a filter dropdown menu. When a dropdown item is clicked, the query variables are changed and the query refetches as expected.
What I would like to achieve is:
I dont want to clear the cache for all queries, so cache clearing seems not an option. I guess I could
hide
the result list component whileloading: true
, but the component is also used for endless pagination, whereloading
does not always implyclear the result
. I was hoping for a programmatic pattern to set the query result tonull
, an empty list or whatever would be appropriate.Did I miss something in the documentation or is this not supported? I already tried
query.skip
,query.update
,query.setData
,query.stop/start
, but nothing helped so far.Beta Was this translation helpful? Give feedback.
All reactions