Feature request for normalized caching:
we have:
foo(bar: $bar, baz: $baz, bob: $bob) {
...Stuff
}
but we want to ignore "bob" for cache keys so we have a
override fun getFieldKey(context: FieldKeyContext): String {
return if (context.parentType == MyType.type.name && context.field.name =="foo") {
val newField = context.field.newBuilder()
.arguments(
context.field.arguments.filter { argument ->
argument.definition.name != "bob"
},
)
.build()
val newContext = FieldKeyContext(
parentType = context.parentType,
field = newField,
variables = context.variables,
)
connectionFieldKeyGenerator.getFieldKey(newContext)
} else {
connectionFieldKeyGenerator.getFieldKey(context)
}
}
is there a way to support this in the normalized cache key config similar to (hypthetical syntax)
extend type MyType {
entities @typePolicy(ignoreArguments: "bob")
}
or the inverse
extend type MyType {
entities @typePolicy(keyArguments: "bar baz") // ignores bob
}
Feature request for normalized caching:
we have:
but we want to ignore "bob" for cache keys so we have a
is there a way to support this in the normalized cache key config similar to (hypthetical syntax)
or the inverse