Skip to content
tRPC

Partners

Type Alias: RetryLinkContext<TInferrable, TAugmented>

On this page

RetryLinkContext<TInferrable, TAugmented>: Omit<TAugmented, "retry"> & object

Defined in: packages/client/dist/index.d.mts:382

The context calls can pass through retryLink: the fields added to OperationContext (TAugmented), which its callbacks may read, and retry.

Type declaration

retry?

optional retry: RetryFn<TInferrable> | "retry" extends keyof TAugmented ? TAugmented["retry"] : never

Decides whether to retry this call, in place of the link's retry. Anything else, such as a flag added to OperationContext that the link's retry reads, is left to the link.

Example

client.post.byId.query(input, { context: { retry: (opts) => opts.attempts <= 3 } })

Type Parameters

Type ParameterDefault type
TInferrable extends InferrableClientTypes-
TAugmented extends objectAugmentedOperationContext