Closed jotai-coder closed 8 months ago
@jotai-coder where are you defining the custom cache key function? It must be in the SchemaConfiguration.swift
file to be called correctly. If that is how you've set it up then please share a sample project demonstrating the issue that we can debug.
@jotai-coder where are you defining the custom cache key function? It must be in the
SchemaConfiguration.swift
file to be called correctly. If that is how you've set it up then please share a sample project demonstrating the issue that we can debug.
Do you have a template project I could use as a starting point?
You just need a simple project with a schema you can share. As long as it demonstrates the problem it doesn't need to be anything complicated.
I'm closing this issue due to inactivity. If this is still unresolved, feel free to provide more information and we can re-open this, or create a new issue.
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better.
Question
(version 1.7.0)
I'm trying to define custom cache keys for some of our custom scalars as described in the docs.
However,
cacheKeyInfo(for:object:)
onSchemaConfiguration
is never called during execution of our queries, so we're getting the default cache key implementation.The only path that I see for calling this is in:
GraphQLExecutor.executeChildSelections(forObjectTypeFields:withRootType:onChildObject:accumulator:)
Ultimately implemented inCacheKeyComputingExecutionSource
extension. I'm sure I've missed something, but can't sort out what. Thanks.