agrosner
fieldPolicy
typePolicy
somepage.somepageCardsConnection.cards.3
id
contentBlockInfo { id }
object MonolithCacheKeyGenerator : CacheKeyGenerator { override fun cacheKeyForObject(obj: Map<String, Any?>, context: CacheKeyGeneratorContext): CacheKey? { if (obj["__typename"] === "SomepageCard") { @Suppress("UNCHECKED_CAST") return ((obj["contentBlockInfo"] as Map<String, Any?>?)?.get("id") as? String)?.let { CacheKey(it) } ?: TypePolicyCacheKeyGenerator.cacheKeyForObject( obj, context ) } return TypePolicyCacheKeyGenerator.cacheKeyForObject(obj, context) } }
bod
@typePolicy(keyFields: "id")
SomepageCard
A modern programming language that makes developers happier.