最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

graphql - How do I invalidate all objects of a certain type at once? - Stack Overflow

programmeradmin3浏览0评论

In apollo-client, cache.modify() lets me invalidate individual objects by ID.

However, I need to invalidate all objects of a certain type at once without knowing individual IDs or having a top-level query that contains those objects.

E.g. user clicks "Refresh Books" → invalidate all queries that involve a __typename: "Book" reference or object.

How would I do this?

Edit: URQL supports exactly what I am looking for: Invalidating a type

发布评论

评论列表(0)

  1. 暂无评论