snapshot of https://github.com/TanStack/query.git (main, 2026-09-16; blobs > 131072B omitted)
This commit is contained in:
28
examples/angular/optimistic-updates/src/app/app.config.ts
Normal file
28
examples/angular/optimistic-updates/src/app/app.config.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import {
|
||||
provideHttpClient,
|
||||
withFetch,
|
||||
withInterceptors,
|
||||
} from '@angular/common/http'
|
||||
import {
|
||||
QueryClient,
|
||||
provideTanStackQuery,
|
||||
} from '@tanstack/angular-query-experimental'
|
||||
import { withDevtools } from '@tanstack/angular-query-experimental/devtools'
|
||||
import { mockInterceptor } from './interceptor/mock-api.interceptor'
|
||||
import type { ApplicationConfig } from '@angular/core'
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
provideHttpClient(withFetch(), withInterceptors([mockInterceptor])),
|
||||
provideTanStackQuery(
|
||||
new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
gcTime: 1000 * 60 * 60 * 24, // 24 hours
|
||||
},
|
||||
},
|
||||
}),
|
||||
withDevtools(),
|
||||
),
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user