첫 커밋
This commit is contained in:
20
src/shared/configs/query.ts
Normal file
20
src/shared/configs/query.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { QueryClient } from '@tanstack/react-query';
|
||||
|
||||
const globalQueryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
// 사용자에게 에러상태를 즉시 보여주기 위해 retry false로 지정
|
||||
retry: false,
|
||||
refetchOnWindowFocus: true,
|
||||
throwOnError: true,
|
||||
// suspense: true,
|
||||
networkMode: 'always',
|
||||
},
|
||||
mutations: {
|
||||
throwOnError: true,
|
||||
networkMode: 'always',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const getGlobalQueryClient = (): QueryClient => globalQueryClient;
|
||||
Reference in New Issue
Block a user