Apollo GraphQl react. How to clear query cache for all variable combinations?

前端 未结 4 801
遥遥无期
遥遥无期 2021-02-12 10:34

I am using apollo graphql in my react application. Say I have the following query:

query ListQuery($filter: String!) {
   items(filter: $filter) {
     id
     n         


        
4条回答
  •  走了就别回头了
    2021-02-12 11:12

    In your case, you can use the apollo's method client.resetStore();

    It will clear the previous cache and then load the active queries.

提交回复
热议问题