Hey, I’m trying to understand why one of these queries in our app just never caches completely. I assumed earlier that maybe another query being run in with overlapping data was causing it to always fetch from the network but after testing it in isolation it seems like the query never writes to the cache even if we try to write directly with client.cache.writeQuery
Query
query FrameworkPageQuery($frameworkStandard: [FrameworkStandard], $frameworkCategory: [FrameworkCategory], $frameworkRegion: [FrameworkRegion]) {
frameworks(
frameworkStandard: $frameworkStandard
frameworkCategory: $frameworkCategory
frameworkRegion: $frameworkRegion
) {
...frameworkFields
__typename
}
frameworkControlCounts {
frameworkPk
controlTemplateCount
controlCount
__typename
}
frameworksEligible {
frameworkPk
__typename
}
frameworkControlReadinessCounts {
frameworkPk
readyControlCount
notReadyControlCount
__typename
}
zones {
id
pk
name
__typename
}
...secondaryPanelSettingsQuery
}
fragment secondaryPanelSettingsQuery on Query {
featureFlags {
id
featureName
isEnabled
__typename
}
__typename
}
fragment frameworkFields on Framework {
pk
id
name
type
description
launchStatus
isEnabled
orgFrameworkPk
shortDescription
category
geolocation
standard
isCustom
__typename
}
I suspected the issue could be related to this issue on Github regarding missing populating fields while spreading the fragments. We tried merging the auto-generated sub-types but had no luck. Any ideas about what could be causing this issue? The Apollo documentation isn’t clear on its behavior regarding partial cache and what leads to it.
Thanks