DEV Community

Discussion on: Colocated Fragments: Organizing your GraphQL queries in React

vitorcamachoo profile image
Vítor Camacho

Really nice approach which solves a lot of issues managing component properties when using typescript for queries that return more or less data depending on the context.

Talking about similar queries,in my project, where using codegen to generate all the functions based on the queries. It happen to have very similar queries for different function names. My question is, how Apollo client will handle the cache when executing queries ver similar?
For example, at the moment I'm using graphql with swr, and the cache is made with a unique key passed into the function.