query

🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.

MIT License

Downloads
58.3M
Stars
40.6K
Committers
818

Bot releases are visible (Hide)

query - v2.4.13

Published by tannerlinsley over 4 years ago

2.4.13 (2020-07-03)

Bug Fixes

  • types: useQuery enabled can be any type (#679) (8efa46c)
  • useBaseQuery: cast enabled to boolean before effect (3bbcb9a), closes #702
query - v2.4.12

Published by tannerlinsley over 4 years ago

2.4.12 (2020-07-02)

Bug Fixes

query - v2.4.11

Published by tannerlinsley over 4 years ago

2.4.11 (2020-07-02)

Bug Fixes

  • Enable partial makeQueryCache configs (#693) (6e6ccfc)
query - v2.4.10

Published by tannerlinsley over 4 years ago

2.4.10 (2020-07-01)

Bug Fixes

  • queries without a query key are not added to cache (e167e8b)
  • revert commit (0b50b75)
query - v2.4.9

Published by tannerlinsley over 4 years ago

2.4.9 (2020-07-01)

Bug Fixes

  • allow empty query key (with config enabled) (cecf521)
query - v2.4.7

Published by tannerlinsley over 4 years ago

2.4.7 (2020-06-30)

Bug Fixes

query - v2.4.6

Published by tannerlinsley over 4 years ago

2.4.6 (2020-06-30)

Bug Fixes

  • types: Add missing type definition for queryFnParamsFilter (#671) (a846524)
query - v2.4.5

Published by tannerlinsley over 4 years ago

2.4.5 (2020-06-29)

Bug Fixes

  • types: Default Error type for setQueryData function (#659) (b3e4dda)
  • types: improve v2 types (#655) (bb3535d)
query - v2.4.4

Published by tannerlinsley over 4 years ago

2.4.4 (2020-06-29)

Bug Fixes

query - v1.5.10

Published by tannerlinsley over 4 years ago

1.5.10 (2020-06-28)

Bug Fixes

  • setQueryData: setQueryData(notInstantiatedQueryKey) now assigns Promise.resolve() instead of new Promise(noop) that caused a never ending promise en certain scenarios. Ref bug #639 (#645) (5546670)
query - v2.4.3

Published by tannerlinsley over 4 years ago

2.4.3 (2020-06-28)

Bug Fixes

  • invalidateQueries: respect enabled flag (50329b3), closes #648
query - v2.4.2

Published by tannerlinsley over 4 years ago

2.4.2 (2020-06-27)

Bug Fixes

  • query-cache: Prevent re-run of query for refetch interval if update is disabled (#640) (db5a51e), closes #635
  • disabling query in suspense mode (#643) (53e8424)
query - v2.4.1

Published by tannerlinsley over 4 years ago

2.4.1 (2020-06-27)

Bug Fixes

  • useMutation: ensure all side-effects are always called (5a5ad74), closes #249 #641
query - v2.4.0

Published by tannerlinsley over 4 years ago

2.4.0 (2020-06-25)

Features

  • add initialStale option to queries (d7048d1)
query - v2.2.3

Published by tannerlinsley over 4 years ago

2.2.3 (2020-06-25)

Bug Fixes

query - v2.2.2

Published by tannerlinsley over 4 years ago

2.2.2 (2020-06-25)

Bug Fixes

  • prefetchQuery: add prefetchQuery(key, options) overload (0054f7f)
query - v2.2.1

Published by tannerlinsley over 4 years ago

2.2.1 (2020-06-24)

Bug Fixes

  • queryKeySerializer now in the right spot of the config (a68dc28)
query - v2.2.0

Published by tannerlinsley over 4 years ago

2.2.0 (2020-06-24)

Bug Fixes

  • call onSuccess for all query instances (c9afbc9)
  • call onSuccess for all query instances on (a05cb50), closes #629
  • don't schedule garbage collection unnecessarily (#627) (1e1e0f6)

Features

  • add default quernFn option (2a31f8d)
query - v2.1.1

Published by tannerlinsley over 4 years ago

2.1.1 (2020-06-24)

Bug Fixes

  • query.state.isFetching defaults to the loading status, despite lack of data (fd280ec), closes #624
query - v2.1.0

Published by tannerlinsley over 4 years ago

2.1.0 (2020-06-24)

Bug Fixes

  • suspense boundaries now catch query errors accurately

Features

  • added queryCache.resetErrorBoundaries (4c741f7)

Whether you are using suspense or useErrorBoundaries in your queries, you will need to know how to use the queryCache.resetErrorBoundaries function to let queries know that you want them to try again when you render them again.

How you trigger this function is up to you, but the most common use case is to do it in something like react-error-boundary's onReset callback:

import { queryCache } from "react-query";
import { ErrorBoundary } from "react-error-boundary";

<ErrorBoundary
  onReset={() => queryCache.resetErrorBoundaries()}
  fallbackRender={({ error, resetErrorBoundary }) => (
    <div>
      There was an error!
      <Button onClick={() => resetErrorBoundary()}>Try again</Button>
    </div>
  )}
>
Package Rankings
Top 0.31% on Npmjs.org
Top 6.69% on Proxy.golang.org
Top 21.14% on Repo1.maven.org