Access the underlying contract endpoint.
Contract name without the resource namespace.
Fully qualified contract name.
Resource namespace used for query-key grouping.
Contract route used as the key segment that disambiguates contracts with
the same local name, such as /v1/todos and /v2/todos list contracts.
Build TanStack Query filters for every cached call to this contract.
Build a contract-level query key without path/query params.
Build TanStack Query filters for one contract call or parameter prefix.
Optionalparams: ContractQueryKeyParams<TContract, TProvidedHeaders>Create infinite query options for TanStack Query.
Use static path/query with page(...) when page params can be merged
into a stable key. Use params(...) with an explicit key when every page
needs fully dynamic args. For contracts that follow the framework cursor
convention, spread cursorPagination() instead of writing
initialPageParam, getNextPageParam, and page(...) by hand.
The observed data defaults to InfiniteData of the contract response, so
useInfiniteQuery(...).data.pages is typed per page. Pass select to
narrow the observed data type.
Invalidate cached data for this contract.
With no params this invalidates every cached call to the contract. Pass path/query/body params to target a single call or parameter prefix.
Optionalparams: ContractQueryKeyParams<TContract, TProvidedHeaders>Optionaloptions: ContractQueryFilterOptionsBuild a stable query key for this contract
Only includes path/query in the key when they have defined values. This ensures consistent serialization between server (dehydrate) and client (hydrate), since undefined object values may serialize differently across React's RSC boundary vs JSON.stringify.
Headers are never included unless the adapter opted in with
createReactQuery(client, { keyHeaders }), and then only the whitelisted
header names are included.
Optionalparams: { body?: unknown; headers?: unknown; path?: unknown; query?: unknown }Create mutation options for TanStack Query.
The generated mutationFn accepts the same variables shape as the
underlying contract endpoint call.
For contracts with idempotency metadata, the generated mutationFn
derives one idempotency key per variables object and keeps it stable
across TanStack retry attempts, which re-invoke mutationFn with the same
object. Reusing that object for a later mutation also reuses the key. Pass
idempotencyKey in the variables to control the key explicitly. Calling
mutate() with no variables falls back to per-attempt key generation in
the client.
Build TanStack Query filters for all contracts in this namespace.
Build a namespace-level query key for resource-wide cache operations.
Create query options for TanStack Query.
Pass the result to useQuery, prefetchQuery, fetchQuery, or any API
that accepts query options.
Pass select to narrow the observed data type. The generated queryFn
still returns and caches the raw contract response.
TanStack Query helper bound to one Beignet contract.
The helper intentionally exposes TanStack Query options instead of hiding React Query. Query keys are stable and grouped by Beignet namespace so apps can invalidate a resource or a single contract.