当我relayStylePagination
在 Apollo 客户端缓存类型策略中使用辅助函数时,即使我refetch
手动调用该函数,更改传递给查询的变量也不会再次调用该查询。它完美地完成了fetchMore
行为并合并了新数据。
我的缓存字段如下所示:
cache: new InMemoryCache({
typePolicies: {
Query: {
fields: {
inventories: relayStylePagination(),
},
},
},
})