@appello/services
Version:
Services package with api / graphql
12 lines (11 loc) • 546 B
TypeScript
import { MutationCache, QueryCache, QueryClientConfig as BaseQueryClientConfig } from '@tanstack/react-query';
import { ApiServiceReturn } from '../api';
export type QueryCacheConfig = ConstructorParameters<typeof QueryCache>[0];
export type MutationCacheConfig = ConstructorParameters<typeof MutationCache>[0];
export interface QueryClientConfig {
api: ApiServiceReturn;
config?: Omit<BaseQueryClientConfig, 'queryCache' | 'mutationCache'> & {
queryCache?: QueryCacheConfig;
mutationCache?: MutationCacheConfig;
};
}