Closed MikePodgorniy closed 3 years ago
What is the NormalizedCacheObject
in this one?
the result type of apollo client with some InMemoryCache config
And maybe you need to define types for logger cb function?
const logger = ({
state: { queries, mutations },
dataWithOptimisticResults: inspector,
}: {
state: {
queries: any;
mutations: any;
};
dataWithOptimisticResults: any;
}) => {
counter++;
enqueued = {
counter,
queries,
mutations,
inspector,
};
if (currentConnection !== null) {
currentConnection.send('broadcast:new', enqueued);
}
};
client.__actionHookForDevTools(logger as () => void);
And maybe you need to define types for logger cb function?
Yeah all of this would benefit from typing properly, so go ahead if you are able to figure out the types!
ApolloClient<NormalizedCache | NormalizedCacheObject>