__typename no longer implicitly included in results #3447
-
Since upgrading to urql 4 and graphcache 6, Now in theory that is not too bad, but now I have to turn the Any hint's on how I can get them back? My setup: createClient({
url: import.meta.env.VITE_GRAPHQL_URL ?? "/graphql",
exchanges: [
devtoolsExchange,
cacheExchange(graphCacheOptions),
authExchange(async (utils) => { ... }),
fetchExchange,
]
})
const graphCacheOptions: CacheExchangeOpts = {
schema,
keys: ...
updates: ...
resolvers: ...
}; |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
You can add an exchange that always adds |
Beta Was this translation helpful? Give feedback.
Yes, if you don't ask for
__typename
in the original query then it won't be sent back, TLDR if the cache has to add it you will lose it 😅 . so there might be a way to add it in an exchange in the front of your chain.