0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
Commit graph

5,011 commits

Author SHA1 Message Date
Pushpinder Singh
253fe24c61
docs: Fix typo (#1430) 2020-12-15 11:54:20 +01:00
Jonas Reitmann
28b7e70aaa
docs: Fix syntax error (#1428) 2020-12-15 03:23:30 -07:00
jfranty
48b3bc811a
docs: Fix typo in comparison.md (#1427) 2020-12-15 03:08:38 -07:00
Tanner Linsley
c2cec1b2e3
Update index.js 2020-12-14 18:41:38 -07:00
Bruno Bigras
94ab4a01f9
docs: add missing 'resolve-from' dep to examples/nextjs (#1417) 2020-12-14 16:49:13 -07:00
Tanner Linsley
b030e0e258 types(devtools): better types for devtools
Fixes #1406
2020-12-14 16:46:39 -07:00
Tanner Linsley
5e4ef153de fix(devtools): Do not include devtools for production 2020-12-14 16:28:52 -07:00
Timo Vink
224125afe8
docs: Fix broken links (#1419)
Co-authored-by: Timo Vink <timo.vink@orbis.com>
2020-12-14 16:10:11 -07:00
Bruno Bigras
67ba20d39e
fix: remove unneeded bracket in README (#1418) 2020-12-14 22:53:12 +01:00
Matthew Mikolay
2608241d2a
docs: fix links (#1414) 2020-12-14 13:52:39 -07:00
Timo Vink
837c6fd313
docs: fix example in defaultQueryFn guide page (#1416) 2020-12-14 13:52:24 -07:00
Akhila Ariyachandra
033dffcfa9
docs: Fix typo (#1405) 2020-12-14 09:28:21 -07:00
Jelte Homminga
d04045827e
docs: typo Walkthough -> Walkthrough (#1399) 2020-12-14 09:27:50 -07:00
Tanner Linsley
5350fb9511
docs: fix white space 2020-12-14 09:11:05 -07:00
Michael Shtilerman
80cecef22c
fix(queryCache): stop deepIncludes exception comparing null (#1403)
typeof null === 'object'

Co-authored-by: mike-shtil <mike.shtil@gmail.com>
2020-12-14 08:41:48 -07:00
Dominik Dorfmeister
97ee73382b
docs: typescript example (#1400)
* (docs): add typescript example for optimistic updates

* (docs): add a Counter to show off the "select" option in TypeScript

* (docs): simplify TypeScript example

There is no need to add generics to userQuery now - it will be inferred correctly by the options

* return context from onMutate and define types on the `onMutate` function

* add missing select option to useQuery api reference
2020-12-14 06:32:49 -07:00
Tanner Linsley
3c1d2f0e77 docs: update installation 2020-12-14 00:07:55 -07:00
Tanner Linsley
8103d9675e docs: update home page 2020-12-13 23:28:19 -07:00
Tanner Linsley
310c222b38 chore: update release config 2020-12-13 23:04:34 -07:00
Tanner Linsley
8aa4cb3e04 Update logo.sketch 2020-12-13 23:00:13 -07:00
Tanner Linsley
6618b1e6a8 docs: update example dependencies 2020-12-13 19:46:24 -07:00
Tanner Linsley
ac342e237a
v3 (#1360) v3.2.0
* feat: initial v3 changes (#1079)

* force website deploy

* docs: v3 updates

* docs: More documentation improvements

* docs: update query filters page

* docs: update query keys

* docs: more updates

* docs: updates

* feat: support multiple subscribers in observers

* docs: useMutation updates

* fix: mutate argument types and state update order

* fix: remove cache argument in cache callback

* fix: move optimistic fetching state into query observer

* fix: make sure default options can be overridden

* fix: type improvements

* feat: memoize select function result

* fix: only suspend when mounting

* docs: refactor to top level pages and multiple api reference pages per export

* test: add remove query test

* feat: add filters client isFetching and useIsFetching hook

* docs: temp move docs back to docs directory

* docs: solve conflicts

* docs: fix queryClient reference

* docs: reorg directory structure

* docs: fix queryClient reference

* docs: fix links

* docs: better phrasing

* docs: force docs build

* docs: update examples

* fix: use updatedAt to check for existing data

* feat: add structural sharing to select result

* refactor: update hashing terminology

* test: add ability to wrap react query updates with React act

* refactor: replace console with logger implementation

* docs: add migration page to navigation

* docs: update installation docs

* refactor: reduce file size

* docs: update examples

* fix: always compare query keys as arrays

* refactor: mark observers as private

* test: update timings in hydration cache time test

* docs: Update queries.md (#1134)

* feat: split mutate into mutate and mutateAsync (#1130)

* feat: split mutate into mutate and mutateAsync

* docs: Update docs/src/pages/guides/mutations.md

Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>

* feat: add bi-directional infinite query support (#1135)

* refactor: reduce file size

* feat: revert to previous state on cancellation

* fix: wait for all queries to cancel

* docs: update cancellation docs

* build: force

* build: add beta build

* build: add beta build

* docs: update comparison

* fix: support infinite cache time when hydrating

* refactor: explicitly mark package side effects

* docs: update comparison

* docs: update comparison

* fix: remove excess exports

* feat: add support for default options when hydrating

* docs: fix links

* feat: add options to setQueryData

* fix: align notify terminology

* feat: Major semver bump

BREAKING CHANGE: Increment Major Version

* fix: always try to fetch if enabled

* feat: bump version

* fix: refetch should create new query when removed

* chore: do not publish beta until we figure this out

* make beta prerelease

* dry run releases

* fix: test dry run semantic release

* release beta releases for realzies

* test: add eslint rule

* docs(useQuery): change manual to enabled (#1167)

* feat: move mutations into the core (#1162)

* feat: tree shake infinite query and support manual updates

* docs: update comparison

* refactor: remove observer factory

* refactor: add subscribable

* refactor: move hasListeners

* refactor: optimize bundle

* fix: add status bools to use mutation result

* feat: api update

* fix: add defaults to UseMutationOptions type

* docs: add pages

* fix: cleanup

* refactor: use queryCache property directly

* docs: Add placeholder data guide

* docs: fix typo

* fix: keep previous query status when fetching

* fix: stop retry when observers unmount

* feat: add additional notify flags

* fix: only keep notify on stale option

* refactor: only batch react callbacks

* test: update timings

* refactor: also batch in suspense

* feat: add hydration support for mutations

* fix: remove query immediately if cacheTime is 0

* fix: prevent infinite fetch loop

* refactor: move refetch logic into observer

* fix: match query key correctly when setting defaults

* test: add query defaults test

* fix: re-add useMutation callback composition

* feat: use set defaults also for observers

* test: add enabled assertion

* feat: add ability to manually control the online and focus state

* docs: update onlineManager documentation

* feat: add discriminated unions for query results (#1247)

* fix: only set state in listeners when provided

* docs: add testing page

* feat: add query function context (#1261)

* feat: add errorUpdatedAt property

* fix: only trigger suspense when loading for the first time

* fix: make sure suspense is always triggered when loading a query

* fix: add ability to type the query key in the query function context

* refactor: make isDataEqual type more specific

* docs: update react native focus code

* fix: make sure to remove the correct query from cache

* test: remove only

* feat: add granular component re-render control

* fix: make sure component re-render when they should

* feat: throw error when QueryClientProvider has not been used to set a query client (#1309)

Also updated docs

* test: add invalidateQueries test

* fix: prevent state update after mutation unmounted

* fix: add defaults to setQueryData

* fix: cancellations for useInfiniteQuery (#1359)

* chore: update TypeScript version (#1314)

* Merge branch 'master' into beta

* fix(hydration): set fetchMeta to null by default to make it serializable (#1371)

* fix(hasPageParam): look for (undefined | null | false) values

* chore: fix linting

* fix: cross-bundle/version query client context

* docs: Update Examples

* docs: update example deps

* docs: keepPreviousData not set in paginated queries docs (#1376)

* docs: typo infinite instead of ininite (#1379)

* feat: devtools are now native to the core repo/npm-package

* feat(persist-localstorage-experimental): temporarily persist cache to disk

* tests: fix linting

* chore: attempt codesandbox import fix

* chore: revert codesandbox fix

* fix(persist-localstorage): add ssr-safety

* docs: fix typos in migration and queries guide (#1387)

Fix typos in guides/migrating-to-react-query-3 and guides/queries.

Fixes #1378

* docs(typos): fix typos in mutations guide (#1392)

* docs: update migration guide

* docs: update comparison

* chore: remove vercel.json

* docs: update comparison

* Update logo.sketch

* feat: reset query utils (#1375)

* feat: reset query utils

* Update queryClient.ts

* Reset query docs and tests (#1393)

* docs: Add resetQueries

* test: Add resetQueries tests

* remove unnecessary queryCache.reset methods

Co-authored-by: Aaron Jensen <aaronjensen@gmail.com>

* types: fix mutation context type

* fix: isFetched and isFetchedAfterMount should include failed fetches

* docs: Persist localstorage plugin

* feat: resetQueries refetches active queries (#1397)

Co-authored-by: Niek Bosch <just.niek@gmail.com>
Co-authored-by: Abhijeet Singh <contact.abhijeetsingh@gmail.com>
Co-authored-by: JP Angelle <jp@angelle.me>
Co-authored-by: Jake Ginnivan <jake@ginnivan.net>
Co-authored-by: Tom Klaver <tomklav@gmail.com>
Co-authored-by: Dmitry Ivanov <liseniss@gmail.com>
Co-authored-by: Corentin Leruth <tinencor@gmail.com>
Co-authored-by: ConneXNL <contact@ivia-solutions.com>
Co-authored-by: Rubén Moya <rmoyarodriguez@gmail.com>
Co-authored-by: Pascal Wegner <p.wegner1992@gmail.com>
Co-authored-by: Amen SOUISSI <48829921+amen-souissi@users.noreply.github.com>
Co-authored-by: Aaron Jensen <aaronjensen@gmail.com>
2020-12-13 19:34:19 -07:00
Akshay S Dinesh
8aeb209c3b
docs: make hook return all necessary variables (#1391) 2020-12-11 03:07:54 -07:00
Tanner Linsley
7786867cd7
Update index.js 2020-12-09 11:54:48 -07:00
Piotr lasota
e817072185
docs: add emoji to mutations docs page (#1377)
Add emoji to mutations docs page for better UX.
2020-12-09 02:13:11 -07:00
Bernardo Mariano
6ef8f8a782
docs: Add infinite scrolling specific test examples (#1372) 2020-12-08 12:23:15 -07:00
Uday Vunnam
6e2e37ea5f
fix(types): change the order of types so that correct type inference is picked for **Object syntax** (#1330) v2.26.4
* Change the order of types

Change the order of types so that correct type inference is picked for Object sytax

* change order of types

* Update usePaginatedQuery.ts
2020-12-06 21:15:32 -07:00
liaoliao666
820b4ffe05
optimization(query): reduce unnecessary recursion (#1329)
* Only work once when forceFetchOnMount is ture or refetchOnMount is 'always'

* fixed(queryObserver): fetch data twice when mounted

* optimization(query): reduce unnecessary recursion
2020-12-06 21:13:25 -07:00
Nico Prananta
11bf7a44d1
docs: Update query-cancellation.md (#1328)
* Update query-cancellation.md

Add sample code to manually cancel a query.

* Update query-cancellation.md

* Update query-cancellation.md

* Update query-cancellation.md
2020-12-06 21:12:13 -07:00
liaoliao666
ae1009496c
fixed(queryObserver): fetch data twice when mounted (#1320)
* Only work once when forceFetchOnMount is ture or refetchOnMount is 'always'

* fixed(queryObserver): fetch data twice when mounted

* optimization(query): reduce unnecessary recursion
2020-12-06 21:10:33 -07:00
Yordis Prieto
f52953c912
docs: add isFetched variable info (#1317) 2020-12-06 21:09:29 -07:00
Angus
7535383eba
fix: clearTimeout instead of clearInterval (#1305) v2.26.3
jest modern timers break because the stale timeout is created with setTimeout but cleared with clearInterval
2020-11-19 23:16:32 -07:00
Eugene Asiedu
a56a5b59a2
docs: fix typo for options used in querycache (#1291) 2020-11-16 07:30:28 -07:00
Arman
7cd586ffe6
docs: correct example code (#1290) 2020-11-15 08:17:53 -07:00
Jon Roach
37ad9c127d
docs(infiniteQuery guide): include missing error (#1289) 2020-11-14 14:12:37 -07:00
Juan gabriel ramirez cruz
3de60e6f0f
docs: isSuccess is a boolean not a function (#1282) 2020-11-12 12:55:07 -07:00
mackie
ff1bfb2dbc
docs: fix graphql-request typo (#1277) 2020-11-11 15:23:47 -07:00
Tanner Linsley
25a776d98d Merge branch 'master' of https://github.com/tannerlinsley/react-query 2020-11-06 14:08:15 -07:00
Tanner Linsley
fb596eadf9 docs: update sponsors 2020-11-06 11:36:39 -07:00
Mario Beltrán Alarcón
df3460bd4f
fix: Update React peer dependency (#1260) v2.26.2
Update React peer dependency to include v17. Without this change everything is working fine but "incorrect peer dependency" warning appears in the console.

I think no CI change is necessary to run tests over React v16 and v17?
2020-11-05 09:18:48 -07:00
Graham Cox
35efec795a
docs: Guide page for testing - (#1244)
* Guide page for testing - first draft

* Update docs/src/pages/docs/guides/testing.md

Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
2020-11-03 14:39:53 -07:00
Tanner Linsley
61e7b9b854 fix: semantic release maintenance (no changes) v2.26.1 2020-11-03 14:25:16 -07:00
Tanner Linsley
f613e18f34 feat: semantic release maintenance (no changes) v2.26.0 2020-11-03 14:12:19 -07:00
Tanner Linsley
5d56cf5c28 docs: update sponsors 2020-11-02 09:34:34 -07:00
Tanner Linsley
69236d3e0b docs: update videos 2020-10-29 13:40:25 -06:00
Tanner Linsley
809f9bb7da docs: update sponsors 2020-10-26 14:42:36 -06:00
Tanner Linsley
f8ec3c1dc7 fix: semantic release v2.25.2 2020-10-21 14:30:04 -06:00
Tanner Linsley
29944da8aa fix: fix semantic release v2.25.1 2020-10-21 14:17:19 -06:00
Tanner Linsley
3fce2ec026
feat: add placeholderData to queryObserver (#1161)
* feat: add placeholderData to queryObserver

* Add docs and a few tests (one failing)

* Add isPlaceholderData

* Update api.md
2020-10-21 13:42:07 -06:00
aleris
6e30aaa0be
docs(typescript): add note for custom hooks types (#1185)
When using with typescript, the error type cannot be inferred and appears as 'unknown'.
This adds an explicative note and example as it might not be obvious how a custom hook should be created.
2020-10-19 20:38:02 -06:00