Skip to content
Kitbay

frontend-data-fetching

NOASSERTIONUpdated on Nov 11, 202645,751GitHub stars

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.

What the skill teaches

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.

Capabilities

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