Skip to main content
Version: 10.x

TRPCClient<TRouter>

Deprecated

Type parameters

  • TRouter extends AnyRouter

Properties

runtime

Readonly TRPCClientRuntime

Defined in: packages/client/src/createTRPCClient.ts:22

Methods

mutation()

Signature

ts
mutation<TMutations, TPath, TInput>(path: TPath, input?: TInput, opts?: TRPCRequestOptions): Promise<inferTransformedProcedureOutput<TMutations[TPath]>>;
ts
mutation<TMutations, TPath, TInput>(path: TPath, input?: TInput, opts?: TRPCRequestOptions): Promise<inferTransformedProcedureOutput<TMutations[TPath]>>;

Type parameters

  • TMutations extends any
  • TPath extends string
  • TInput extends any

Parameters

NameType
pathTPath
input?TInput
opts?TRPCRequestOptions

Returns

Promise<inferTransformedProcedureOutput<TMutations[TPath]>>

Defined in: packages/client/src/createTRPCClient.ts:33

query()

Signature

ts
query<TQueries, TPath, TInput>(path: TPath, input?: TInput, opts?: TRPCRequestOptions): Promise<inferProcedureOutput<TQueries[TPath]>>;
ts
query<TQueries, TPath, TInput>(path: TPath, input?: TInput, opts?: TRPCRequestOptions): Promise<inferProcedureOutput<TQueries[TPath]>>;

Type parameters

  • TQueries extends any
  • TPath extends string
  • TInput extends any

Parameters

NameType
pathTPath
input?TInput
opts?TRPCRequestOptions

Returns

Promise<inferProcedureOutput<TQueries[TPath]>>

Defined in: packages/client/src/createTRPCClient.ts:23

subscription()

Signature

ts
subscription<TSubscriptions, TPath, TOutput, TInput>(path: TPath, input: TInput, opts: TRPCRequestOptions & Partial<TRPCSubscriptionObserver<TOutput, TRPCClientError<TRouter>>>): Unsubscribable;
ts
subscription<TSubscriptions, TPath, TOutput, TInput>(path: TPath, input: TInput, opts: TRPCRequestOptions & Partial<TRPCSubscriptionObserver<TOutput, TRPCClientError<TRouter>>>): Unsubscribable;

Type parameters

  • TSubscriptions extends any
  • TPath extends string
  • TOutput extends unknown
  • TInput extends any

Parameters

NameType
pathTPath
inputTInput
optsTRPCRequestOptions & Partial<TRPCSubscriptionObserver<TOutput, TRPCClientError<TRouter>>>

Returns

Unsubscribable

Defined in: packages/client/src/createTRPCClient.ts:43