ConnectQueryKey<I>: [serviceTypeName: string, methodName: string, input: PartialMessage<I>]

TanStack Query requires query keys in order to decide when the query should automatically update.

QueryKeys in TanStack Query are usually arbitrary, but Connect-Query uses the approach of creating a query key that begins with the least specific information: the service's typeName, followed by the method name, and ending with the most specific information to identify a particular request: the input message itself.

For example, for a query key might look like this:

Type Parameters

Example

[
"connectrpc.eliza.v1.ElizaService",
"Say",
{ sentence: "hello there" },
]

Generated using TypeDoc