-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.ts
64 lines (58 loc) · 1.55 KB
/
options.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import type { ClientOptions as _ClientOptions } from '@urql/core'
export interface UrqlModuleOptions {
clients: {
[key: string]: ClientOptions
}
/**
* @default 'urql'
*/
configDir?: string
/**
* Auto import `gql` to global. (Vue and nitro)
*
* @default true
*/
gql?: boolean
}
export type ClientOptions = Omit<_ClientOptions, 'fetch' | 'exchanges' | 'fetchOptions'> & {
/**
* @description Rewrite the url in client side.
*/
urlClient?: string
/**
* @description Replace fetch with nuxt built-in ofetch. Could provide better performance for full stack app.
*
* @see https://nuxt.com/docs/api/utils/dollarfetch
* @default true
*/
useDollarFetch?: boolean
/**
* @description Allow json friendly data only.
* It will be send to the client so don't put secret here.
*
* It works in both vue app and nitro server.
*
* @default {}
*/
fetchOptions?: {
headers?: Record<string, string>
} & RequestInit
/**
* @description The credentials policy you want to use for the fetch call.
*
* This option is only works in client side (browser).
* See https://nuxt.com/docs/getting-started/data-fetching#passing-headers-and-cookies
*
* @default 'omit'
*/
credentials?: 'include' | 'omit' | 'same-origin'
/**
* @description The list of cookies you want to send to the api.
*
* This option is only works in server side (Vue SSR).
* See https://nuxt.com/docs/getting-started/data-fetching#passing-headers-and-cookies
*
* @default []
*/
cookiesFilter?: string[]
}