Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset query docs and tests #1393

Merged
merged 2 commits into from
Dec 12, 2020

Conversation

aaronjensen
Copy link
Contributor

@vercel
Copy link

vercel bot commented Dec 11, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tannerlinsley/react-query/3spvyzlc9
✅ Preview: https://react-query-git-feat-reset-query.tannerlinsley.vercel.app

@tannerlinsley tannerlinsley merged commit 77c817f into TanStack:feat-reset-query Dec 12, 2020
tannerlinsley added a commit that referenced this pull request Dec 12, 2020
* 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>
tannerlinsley added a commit that referenced this pull request Dec 14, 2020
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants