Skip to main content

Interface: ReactClientDefaults#

Properties#

lazyFetchPolicy#

• Optional lazyFetchPolicy: cache-and-network | network-only | no-cache

Define default 'fetchPolicy' hooks behaviour

Valid for useLazyQuery

You can override it on a per-hook basis

default "network-only"

Defined in: client.ts:97


lazyQuerySuspense#

• Optional lazyQuerySuspense: boolean

Enable/Disable by default 'React Suspense' behavior for useLazyQuery hook

_Valid only for useLazyQuery_

You can override it on a per-hook basis

default false

Defined in: client.ts:46


mutationSuspense#

• Optional mutationSuspense: boolean

Enable/Disable by default 'React Suspense' behavior for useMutation hook

_Valid only for useMutation_

You can override it on a per-hook basis

default false

Defined in: client.ts:66


preparedSuspense#

• Optional preparedSuspense: boolean

Enable/Disable by default 'React Suspense' behavior for prepareQuery hooks

_Valid only for prepareQuery_ hooks

You can override it on a per-hook basis

The default value is obtained from the "defaults.suspense" value

Defined in: client.ts:76


refetchAfterHydrate#

• Optional refetchAfterHydrate: boolean

Refetch after SSR hydration

default false

Defined in: client.ts:123


retry#

• Optional retry: RetryOptions

Retry on error behaviour

You can override these defaults on a per-hook basis

_Valid for useMutation, useLazyQuery, useTransactionQuery & useRefetch_

default true

Defined in: client.ts:117


staleWhileRevalidate#

• Optional staleWhileRevalidate: boolean

Enable/Disable default 'stale-while-revalidate' behaviour

_Valid for graphql HOC & useQuery_

You can override it on a per-function basis

default false

Defined in: client.ts:107


suspense#

• Optional suspense: boolean

Enable/Disable by default 'React Suspense' behavior

_Valid for graphql HOC & useQuery_

You can override it on a per-function basis

default false

Defined in: client.ts:36


transactionFetchPolicy#

• Optional transactionFetchPolicy: FetchPolicy

Define default 'fetchPolicy' hooks behaviour

_Valid for useTransactionQuery_

You can override it on a per-hook basis

default "cache-first"

Defined in: client.ts:87


transactionQuerySuspense#

• Optional transactionQuerySuspense: boolean

Enable/Disable by default 'React Suspense' behavior for useTransactionQuery hook

_Valid only for useTransactionQuery_

You can override it on a per-hook basis

The default value is obtained from the "defaults.suspense" value

Defined in: client.ts:56

Last updated on by github-actions[bot]