# All channels
Sachin D. Shinde@sachin-shinde
Can I do mutations without hooks?
I'm very new to apollo and I'm trying to implement refreshToken logic. Therefore I'm using a custom fetch function that checks the response of the request and if that returns an 'Unauthorized' I would like to fetch a new token with my refreshToken. As the customFetch is not a…
Control merging of every query result to the cache, on a collaboration app.
We're building a an app with collaboration and optimistic ui updates. On every query/mutation/subscription result, we need to decide wether to allow each possible cacheable object in that result to be merged to the cache or discarded. Any ideas on how to achieve this? We already…
Updating the cache after a mutation
I found this incredibly hard to search for directly - I kept ending up with blog posts about writeFragment, etc. but what I want to know is... if I have a query like this: and then do will that update the entity stored in the cache for the original query? Note that I'm selecting…
Slow query, fast mutation, broken cache.
Hi all. I have a slow running query that updates some data in my application's cache. The query takes ~2 seconds. I also have a fast running mutation that affects that same data, and pulls the updated data as a result. I've noticed that if the slow query starts, and within the…
How do I pass headers to apolloClient for both SSR and Client Side Rendering?
I am writing a Next/React application with an Apollo graphql server. Some of the queries are to be executed server side to be displayed to the user (for example a record of their orders), others will be triggered with an onClick (for example when searching products). While the…
Apollo useLazyQuery not working expectedly
I am trying to fetch data using the Apollo useLazyQuery hook but the hook is not returning anything. I tried to console.log(data, loading, error, called ) but everything is empty here even after the function get called. However, I tried the XHR tab. it shows the proper…
Query context typing?
How can I typing in query context? For example, I set some interface with BatchHttpLink. However cannot found how to do that ;D For now, it seems to there are no way based on apollo-client/core/types.ts. Is it possible? Did I missing something? link definitions …
Local state management - Apollo Docs and the @client directive.
While use of this is straightforward in a single app or monorepo app, I've wondered how it can be used in a modular application where the different modules are from different codebases. Are collisions something that needs worrying about? Do we need to implement some naming…