We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1671888 commit ff4ca55Copy full SHA for ff4ca55
packages/web/src/components/cell/createCell.tsx
@@ -1,3 +1,4 @@
1
+import { fragmentRegistry } from '../../apollo'
2
import { getOperationName } from '../../graphql'
3
/**
4
* This is part of how we let users swap out their GraphQL client while staying compatible with Cells.
@@ -68,6 +69,8 @@ function createNonSuspendingCell<
68
69
const { queryCache } = useCellCacheContext()
70
const operationName = getOperationName(query)
71
72
+ const transformedQuery = fragmentRegistry.transform(query)
73
+
74
let cacheKey
75
76
if (operationName) {
@@ -99,7 +102,7 @@ function createNonSuspendingCell<
99
102
} else {
100
103
queryCache[cacheKey] ||
101
104
(queryCache[cacheKey] = {
- query,
105
+ query: transformedQuery,
106
variables: options.variables,
107
hasProcessed: false,
108
})
0 commit comments