CacheKeyResolver
A CacheResolver that resolves objects and list of objects and fallbacks to the default resolver for scalar fields. It is intended to simplify the usage of CacheResolver when no special handling is needed for scalar fields.
Override cacheKeyForField to compute a cache key for a field of composite type. Override listOfCacheKeysForField to compute a list of cache keys for a field of 'list-of-composite' type.
For simplicity, this only handles one level of list. Implement CacheResolver if you need arbitrary nested lists of objects.
Functions
Link copied to clipboard
Return the computed the cache key for a composite field.
Link copied to clipboard
open fun listOfCacheKeysForField(field: CompiledField, variables: Executable.Variables): List<CacheKey?>?
Link copied to clipboard
override fun resolveField(field: CompiledField, variables: Executable.Variables, parent: Map<String, @JvmSuppressWildcards Any?>, parentId: String): Any?
Resolves a field from the cache. Called when reading from the cache, usually before a network request.