Skip to main content

@gqless/react#

Table of contents#

Interfaces#

Type aliases#

FetchPolicy#

Ƭ FetchPolicy: cache-and-network | cache-first | network-only | no-cache

Defined in: common.ts:144


LazyFetchPolicy#

Ƭ LazyFetchPolicy: Exclude<FetchPolicy, cache-first>

Defined in: query/useLazyQuery.ts:13


OnErrorHandler#

Ƭ OnErrorHandler: (error: gqlessError) => void

Type declaration:#

â–¸ (error: gqlessError): void

Parameters:#

NameType
errorgqlessError

Returns: void

Defined in: common.ts:496


PropsWithServerCache#

Ƭ PropsWithServerCache<T>: { cacheSnapshot?: string } & T

Props with cacheSnapshot that would be returned from prepareReactRender

Type parameters:#

NameTypeDefault
TRecord<string | number, unknown>{}

Defined in: ssr/ssr.ts:25


UseQueryReturnValue#

Ƭ UseQueryReturnValue<GeneratedSchema>: GeneratedSchema[query] & { $state: UseQueryState }

Type parameters:#

NameType
GeneratedSchemaobject
GeneratedSchema.queryobject

Defined in: query/useQuery.ts:37


UseTransactionQueryOptions#

Ƭ UseTransactionQueryOptions<TData, TVariables>: { fetchPolicy?: FetchPolicy ; notifyOnNetworkStatusChange?: boolean ; onCompleted?: (data: TData) => void ; onError?: OnErrorHandler ; pollInterval?: number ; retry?: RetryOptions ; skip?: boolean ; suspense?: boolean ; variables?: TVariables } & TVariables extends undefined ? { variables?: TVariables } : { variables: TVariables }

Type parameters:#

Name
TData
TVariables

Defined in: query/useTransactionQuery.ts:105

Functions#

createReactClient#

â–¸ createReactClient<GeneratedSchema>(client: GqlessClient<GeneratedSchema>, optsCreate?: CreateReactClientOptions): ReactClient<GeneratedSchema>

Type parameters:#

NameType
GeneratedSchemaobject
GeneratedSchema.mutationobject
GeneratedSchema.queryobject
GeneratedSchema.subscriptionobject

Parameters:#

NameType
clientGqlessClient<GeneratedSchema>
optsCreateCreateReactClientOptions

Returns: ReactClient<GeneratedSchema>

Defined in: client.ts:154

Last updated on by Pablo Sáez