Skip to main content

withCacheUpdater

The withCacheUpdater allows you to use some tools for updating the cache, such as @appendNode.

new InMemoryCache({
addTypename: true,
possibleTypes: introspectionResult.possibleTypes,
typePolicies: withCacheUpdater({
User: {
fields: {
items: relayStylePagination(),
},
},
}),
}),

Arguments

  • typePolicies: A TypePolicy object. Set relayStylePagination() for fields to which @pagination is attached.