Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

app.config.ts

23 lines551 Bytes

1import { provideHttpClient, withFetch } from '@angular/common/http'
2import {
3 QueryClient,
4 provideTanStackQuery,
5 withDevtools,
6} from '@tanstack/angular-query-experimental'
7import type { ApplicationConfig } from '@angular/core'
8​
9export const appConfig: ApplicationConfig = {
10 providers: [
11 provideHttpClient(withFetch()),
12 provideTanStackQuery(
13 new QueryClient({
14 defaultOptions: {
15 queries: {
16 gcTime: 1000 * 60 * 60 * 24, // 24 hours
17 },
18 },
19 }),
20 withDevtools(),
21 ),
22 ],