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:
TanStack Query requires query keys in order to decide when the query should automatically update.
QueryKey
s 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'stypeName
, 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: