Skip to main content

Interface: ResolveOptions<TData>#

Type parameters#

Name
TData

Properties#

noCache#

• Optional noCache: boolean

Ignore the client cache

Defined in: packages/gqless/src/Client/resolvers.ts:30


nonSerializableVariables#

• Optional nonSerializableVariables: boolean

Activate special handling of non-serializable variables, for example, files uploading

default false

Defined in: packages/gqless/src/Client/resolvers.ts:37


onCacheData#

• Optional onCacheData: (data: TData) => boolean

Middleware function that is called if valid cache is found for all the data requirements, it should return true if the the resolution and fetch should continue, and false if you wish to stop the resolution, resolving the promise with the existing cache data.

Type declaration:#

â–¸ (data: TData): boolean

Parameters:#

NameType
dataTData

Returns: boolean

Defined in: packages/gqless/src/Client/resolvers.ts:45

Defined in: packages/gqless/src/Client/resolvers.ts:45


onSelection#

• Optional onSelection: (selection: Selection) => void

Get every selection intercepted in the specified function

Type declaration:#

â–¸ (selection: Selection): void

Parameters:#

NameType
selectionSelection

Returns: void

Defined in: packages/gqless/src/Client/resolvers.ts:49

Defined in: packages/gqless/src/Client/resolvers.ts:49


onSubscription#

• Optional onSubscription: (event: { data: TData ; error?: undefined ; type: data ; unsubscribe: () => Promise<void> } | { data?: TData ; error: gqlessError ; type: with-errors ; unsubscribe: () => Promise<void> } | { data?: undefined ; error?: undefined ; type: start | complete ; unsubscribe: () => Promise<void> }) => void

On subscription event listener

Type declaration:#

â–¸ (event: { data: TData ; error?: undefined ; type: data ; unsubscribe: () => Promise<void> } | { data?: TData ; error: gqlessError ; type: with-errors ; unsubscribe: () => Promise<void> } | { data?: undefined ; error?: undefined ; type: start | complete ; unsubscribe: () => Promise<void> }): void

Parameters:#

NameType
event{ data: TData ; error?: undefined ; type: data ; unsubscribe: () => Promise<void> } | { data?: TData ; error: gqlessError ; type: with-errors ; unsubscribe: () => Promise<void> } | { data?: undefined ; error?: undefined ; type: start | complete ; unsubscribe: () => Promise<void> }

Returns: void

Defined in: packages/gqless/src/Client/resolvers.ts:53

Defined in: packages/gqless/src/Client/resolvers.ts:53


refetch#

• Optional refetch: boolean

Set to true to refetch the data requirements

Defined in: packages/gqless/src/Client/resolvers.ts:26


retry#

• Optional retry: RetryOptions

Retry strategy

Defined in: packages/gqless/src/Client/resolvers.ts:78

Last updated on by github-actions[bot]