#
Interface: ResolveOptions<TData>#
Type parametersName |
---|
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:Name | Type |
---|---|
data | TData |
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:Name | Type |
---|---|
selection | Selection |
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:Name | Type |
---|---|
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