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

studio-queries

Apache-2.02026年11月11日 更新114,826GitHubスター

A maintainer skill in the Supabase monorepo with the conventions for fetching data in Supabase Studio, the dashboard app, using TanStack React Query.

スキルの内容

A maintainer skill in the Supabase monorepo with the conventions for fetching data in Supabase Studio, the dashboard app, using TanStack React Query. Query keys live in a keys file for each domain rather than inside components, and query options are built from private fetch functions that check their inputs and handle errors. Queries run only when their required values exist, permission-gated queries use a dedicated helper that a lint rule protects, and code outside rendering fetches through the query client. Mutation hooks invalidate the related list and detail keys and show an error toast by default, and components render loading, error and success states in that order. The table editor and edge functions code serve as examples.

できること

  • Write React Query hooks for Studio
  • Define query keys per domain
  • Invalidate related queries after mutations
  • Review data-fetching code against the conventions