Skip to main content

Interface: ReactClientDefaults#

Properties#

lazyFetchPolicy#

• Optional lazyFetchPolicy: LazyFetchPolicy

Define default 'fetchPolicy' hooks behaviour

Valid for useLazyQuery

You can override it on a per-hook basis

default "network-only"

Defined in: react/src/client.ts:115


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: react/src/client.ts:55


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: react/src/client.ts:75


paginatedQueryFetchPolicy#

• Optional paginatedQueryFetchPolicy: PaginatedQueryFetchPolicy

Define default 'fetchPolicy' hooks behaviour

Valid for usePaginatedQuery____

You can override it on a per-hook basis

default "cache-first"

Defined in: react/src/client.ts:125


paginatedQuerySuspense#

• Optional paginatedQuerySuspense: boolean

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

_Valid only for usePaginatedQuery_ hooks

You can override it on a per-hook basis

default false

Defined in: react/src/client.ts:95


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: react/src/client.ts:85


refetchAfterHydrate#

• Optional refetchAfterHydrate: boolean

Refetch after SSR hydration

default false

Defined in: react/src/client.ts:151


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: react/src/client.ts:145


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: react/src/client.ts:135


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: react/src/client.ts:45


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: react/src/client.ts:105


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: react/src/client.ts:65

Last updated on by PabloSzx