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
: ATypePolicy
object. SetrelayStylePagination()
for fields to which@pagination
is attached.