Skip to content

Commit fa60782

Browse files
authored
[IJ Plugin] Tweak cache name display for Apollo 3, 4, and incubating (#6026)
1 parent bac37d2 commit fa60782

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

intellij-plugin/src/main/kotlin/com/apollographql/ijplugin/apollodebugserver/ApolloDebugClient.kt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import com.apollographql.apollo3.ApolloClient
66
import com.apollographql.apollo3.debug.GetApolloClientsQuery
77
import com.apollographql.apollo3.debug.GetNormalizedCacheQuery
88
import com.apollographql.apollo3.network.http.LoggingInterceptor
9+
import com.apollographql.ijplugin.util.apollo3
910
import com.apollographql.ijplugin.util.apollo4
1011
import com.apollographql.ijplugin.util.executeCatching
1112
import com.apollographql.ijplugin.util.logd
@@ -119,7 +120,15 @@ class ApolloDebugClient(
119120

120121
val String.normalizedCacheSimpleName: String
121122
get() = when (this) {
122-
"$apollo4.cache.normalized.api.MemoryCache" -> "MemoryCache"
123-
"$apollo4.cache.normalized.sql.SqlNormalizedCache" -> "SqlNormalizedCache"
123+
"$apollo3.cache.normalized.api.MemoryCache",
124+
"$apollo4.cache.normalized.api.MemoryCache",
125+
"com.apollographql.cache.normalized.sql.MemoryCache",
126+
-> "MemoryCache"
127+
128+
"$apollo3.cache.normalized.sql.SqlNormalizedCache",
129+
"$apollo4.cache.normalized.sql.SqlNormalizedCache",
130+
"com.apollographql.cache.normalized.sql.SqlNormalizedCache",
131+
-> "SqlNormalizedCache"
132+
124133
else -> this
125134
}

0 commit comments

Comments
 (0)