Skip to content
Source
Sign inSign up
TanStack/query

refactor(query-core)!: move Suspense policy to adapters #12710

MergedTkDodomerged 6 commits intotkdodo/ref/adapter-throw-on-error fromrefs/pull/12710/headmerged by TkDodo View on GitHub

TkDodocommented

🎯 Changes

Remove the suspense observer option from query-core. The dedicated React and Preact hooks select when to suppress a fetch after switching to a failed query and when to defer combining results until data is ready.

This draft builds on #12709.

Runtime tests, type tests, and Oxlint passed for core and all seven adapters. Against #12709, local Brotli Size Limit measured 12,663 bytes for React full (+14 bytes, +0.11%) and 8,378 bytes for React minimal (+5 bytes, +0.06%). The stack is 21 and 13 bytes below query-v6, respectively. Preview CI is pending.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
  • I have followed the AI contribution policy and fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).
    1. Pushed7c53ad5

    2. Pushedb53114a

    3. Pusheddcbcc42

    4. Pushede10314e

    5. Pushed2a9c58d

    6. TkDodo merged this353ee6f

    7. TkDodo closed this

Sign in to join this conversation.