# Type Alias: RetryLinkContext<TInferrable, TAugmented>

> 

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

Defined in: [packages/client/src/links/retryLink.ts:20](https://github.com/trpc/trpc/blob/5b8ac2f6322053743311f3f21588f99f3ae15e16/packages/client/src/links/retryLink.ts#L20)

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

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

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TInferrable` *extends* `InferrableClientTypes` | - |
| `TAugmented` *extends* `object` | [`AugmentedOperationContext`](https://trpc.io/docs/typedoc/client/index/type-aliases/AugmentedOperationContext.md) |
