Skip to content
Source
Sign inSign up
TanStack/query

feat(react-query): compose query modes and tree-shake client operations on v6 #12714

Closedmanudeli(GitHub profile, opens in a new tab)wants to merge 12 commits intoquery-v6 fromrefs/pull/12714/headopened View on GitHub

Showing 158 changed files with 244 additions and 0 deletions (loading 154).

x
0 of 158 viewed, 158 left
8 additions and 0 deletions.changeset/react-query-pluggable.mdAdded
View file
@@ -0,0 +1,8 @@
+---
+'@tanstack/query-core': minor
+'@tanstack/react-query-pluggable': minor
+---
+​
+Add an experimental ESM-only React Query adapter backed by `@tanstack/query-core`. Apps can import polling, selection, placeholder data, and serial mutation queues where they use them. Use `useQuery(query(options))` for a regular read and `useQuery(suspenseQuery(options))` to suspend on the same cache. Compose `infiniteQuery(options)` with the same hook and Suspense policy to read pages. For imperative fetching, import `fetchInfiniteQuery(client, options)`. Client operations are named functions with the client as their first argument, including `getQueryData(client, key)` and `invalidateQueries(client, filters)`.
+​
+Mutation hooks acquire a cache on first use. For direct access, import `getMutationCache` and call `getMutationCache(client)`. Clients configured with a custom cache return that instance.
100 additions and 0 deletions.github/workflows/react-query-bundle-size.ymlAdded
View file
@@ -0,0 +1,100 @@
+name: React Query app bundle size
+​
+on:
+ pull_request:
+ paths:
+ - '.github/workflows/react-query-bundle-size.yml'
+ - 'integrations/react/bundle-size/**'
+ - 'packages/query-core/**'
+ - 'packages/react-query/**'
+ - 'packages/react-query-pluggable/**'
+ - 'scripts/getTsdownConfig.js'
+ - '.nvmrc'
+ - 'package.json'
+ - 'pnpm-lock.yaml'
+ - 'pnpm-workspace.yaml'
+​
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.number }}
+ cancel-in-progress: true