Skip to content

Commit 79c83c6

Browse files
authored
Expose metadata in cacheDumpProvider (#200)
1 parent f1a9f0c commit 79c83c6

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

normalized-cache/src/jvmCommonMain/kotlin/com/apollographql/cache/normalized/CacheManager.jvmCommon.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ internal actual fun CacheManager.cacheDumpProvider(): () -> Map<String, Map<Stri
1212
cacheClass.normalizedCacheName() to cacheRecords
1313
.mapKeys { (key, _) -> key.keyToString() }
1414
.mapValues { (_, record) ->
15-
record.size to record.fields.mapValues { (_, value) ->
16-
value.toExternal()
17-
}
15+
record.size to (
16+
record.fields.mapValues { (_, value) ->
17+
value.toExternal()
18+
} + mapOf("__metadata" to record.metadata.toExternal())
19+
)
1820
}
1921
}.toMap()
2022
}

0 commit comments

Comments
 (0)