Skip to main content

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


onEmptyResolve#

Optional onEmptyResolve: () => void

Function called on empty resolution

Type declaration:#

▸ (): void

Returns: void

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


onNoCacheFound#

Optional onNoCacheFound: () => void

On No Cache found

Type declaration:#

▸ (): void

Returns: void

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


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:53


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:57


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:86

Last updated on by github-actions[bot]