Capxul Docs
Reference

Hook contract

Shared query, mutation, bootstrap, error, and invalidation behavior.

Most data hooks return UseQueryResult<Data, CapxulError>. Most action hooks return UseMutationResult<Data, CapxulError, Input>, with named concrete return aliases exported from the package.

  • Queries are disabled until the provider has a client.
  • Mutations invoked before readiness fail with CapxulError code WRONG_STATE.
  • A failed CapxulResult becomes the TanStack error value; the React package does not replace it with a string.
  • Successful mutations invalidate related Capxul query keys.
  • Query keys are implementation-owned and rooted at ["capxul"]; applications should use hook APIs instead of constructing those keys.
  • Actor-scoped hooks require explicit personal Account or Organization scope.

See all hooks for each input, return type, enabled condition, and capability caveat.