本文へスキップ
Kitbay
スキル公式

frontend-data-fetching

NOASSERTION2026年11月11日 更新45,751GitHubスター

A maintainer skill in Sentry's own repository for how React code in its frontend calls the Sentry API, using TanStack Query with Sentry's apiOptions helper.

スキルの内容

A maintainer skill in Sentry's own repository for how React code in its frontend calls the Sentry API, using TanStack Query with Sentry's apiOptions helper. It lists the approved helpers for queries, mutations, conditional queries and manual fetches, and marks older helpers as deprecated. Rules require an explicit stale time, reusable abstractions built on the options object rather than on hooks, letting TypeScript infer types instead of passing generics, typing mutation inputs rather than hook generics, and treating errors as plain Error narrowed at runtime. It also explains that the cache holds both JSON and headers and how to read pagination and hit-count headers with a select helper.

できること

  • Write queries and mutations with apiOptions
  • Disable a query conditionally
  • Read pagination and hit-count headers
  • Avoid deprecated query helpers