• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase / 42248873258
87%

Build:
DEFAULT BRANCH: master
Ran 06 Nov 2026 04:10PM UTC
Jobs 1
Files 190
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Nov 2026 04:04PM UTC coverage: 87.069% (+0.04%) from 87.033%
42248873258

push

github

web-flow
fix(studio): pass caller options to grant-gated query factories (#53088)

## Context

Grant-gated query factories returned `queryFn: skipToken` when the
caller had no grant. TanStack Query keeps one options object per cache
entry, overwritten by whichever observer rendered last. When that was a
grant-less observer, invalidation refetched with `skipToken` and failed
with `Missing queryFn`, breaking the query for every other observer on
the key. #53075 patched two call sites; this fixes the factories.

## Changes

- New `grantedQueryOptions` helper (`data/granted-query-options.ts`).
Without a grant, the factory sets `queryFn: undefined` instead of
`skipToken`, so TanStack borrows the query function from a subscribed
observer that has one. The caller's `enabled` applies only when the
factory has a query function.
- `apiKeysQueryOptions`, `revealedApiKeysQueryOptions`,
`branchesQueryOptions`, `branchQueryOptions` and
`branchDiffQueryOptions` take caller options as a second argument. Call
sites change from `useQuery({ ...f(vars), enabled })` to
`useQuery(f(vars, { enabled }))`, so callers can't override the grant
gate.
- New type-aware `fga/no-spread-granted-query-options` lint rule
(error). `grantedQueryOptions` returns a type-only brand, and the rule
flags any spread or `Object.assign` of a branded value, however it was
built or named.
- Restores typed linting as a separate pass
(`eslint.type-checks.config.cjs`, run by `pnpm lint` via
`lint:type-checks`), as #44678 did. Enabling type info in the main
config changes what other plugins report, so it stays separate.
- `studio-queries` skill documents the pattern.

Callers still pass their own grant, so the UI gates on the same grant
the request carries.

## Testing

- `data/api-keys/api-keys-query.test.tsx`: a granted and a grant-less
component share the key, with the grant-less one rendering last;
invalidation via the delete mutation refetches successfully. Fails on
master with `Missing queryFn`.
- `data/g... (continued)

2049 of 2417 branches covered (84.77%)

Branch coverage included in aggregate %.

2846 of 3205 relevant lines covered (88.8%)

201.35 hits per line

Subprojects
ID Flag name Job ID Ran Files Coverage
1 studio-tests 42248873258.1 06 Nov 2026 04:10PM UTC 760
38.2
GitHub Action Run
Source Files on build 42248873258
  • Tree
  • List 190
  • Changed 157
  • Source Changed 0
  • Coverage Changed 157
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #42248873258
  • 597d1ce5 on github
  • Prev Build on master (#42230291742)
  • Next Build on master (#42269096519)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc