urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.

MIT License

Downloads
11.4M
Stars
8.5K
Committers
249

Bot releases are hidden (Show)

Patch Changes

Patch Changes

  • Warn for invalid operation passed to query/subscription/mutation, by @JoviDeCroock (See #1829)

Patch Changes

Patch Changes

Patch Changes

  • Allow mutate to infer the result's type when a TypedDocumentNode is passed via the usual generics, like client.mutation for instance, by @younesmln (See #1796)

Patch Changes

Patch Changes

  • Unwrap the variables proxy before we send it into the client, by @JoviDeCroock (See #1810)

Patch Changes

  • ⚠️ Fix issue where operations that get dispatched synchronously after the cache restoration completes get forgotten, by @JoviDeCroock (See #1789)

Patch Changes

  • Refactor useQuery implementation to utilise the single-source implementation of @urql/[email protected]. This should improve the stability of promisified useQuery() calls and prevent operations from not being issued in some edge cases, by @kitten (See #1758)
  • Updated dependencies (See #1776 and #1755)

Patch Changes

  • Prevent ssrExchange().restoreData() from adding results to the exchange that have already been invalidated. This may happen when restoreData() is called repeatedly, e.g. per page. When a prior run has already invalidated an SSR result then the result is 'migrated' to the user's cacheExchange, which means that restoreData() should never attempt to re-add it again, by @kitten (See #1776)
  • ⚠️ Fix accidental change in passive stale: true, where a cache-first operation issued by Graphcache wouldn't yield an affected query and update its result to reflect the loading state with stale: true. This is a regression from v2.1.0 and mostly becomes unexpected when cache.invalidate(...) is used, by @kitten (See #1755)

Minor Changes

  • Fixed typing of OptimisticMutationResolver, by @taneba (See #1765)

Patch Changes

  • Type the relayPagination and simplePagination helpers return value as Resolver<any, any, any> as there's no way to match them consistently to either generated or non-generated resolver types anymore, by @kitten (See #1778)
  • Updated dependencies (See #1776 and #1755)

Patch Changes

  • Do not set the TTL unless cache outcome is "miss". Previously we set the TTL on cache "miss" if it was the first time an operation returned a result, now the TTL is only set on cache miss results. This allows the request policy exchange to work when using persisted caching, by @Mookiies (See #1742)
  • Updated dependencies (See #1776 and #1755)

Patch Changes

Minor Changes

  • Improve granularity of operationStore updates when query, variables, and context are changed. This also adds an operationStore(...).reexecute() method, which optionally accepts a new context value and forces an update on the store, so that a query may reexecute, by @kitten (See #1780)

Patch Changes

  • Loosen subscription(...) type further to allow any operationStore input, regardless of the Result produced, by @kitten (See #1779)
  • Updated dependencies (See #1776 and #1755)
urql - https://github.com/urql-graphql/urql/releases/tag/[email protected]

Published by urql-ci over 3 years ago

Patch Changes

  • ⚠️ Fix resetUrqlClient not resetting the SSR cache itself and instead restoring data when all data related to this Client and session should've been deleted, by @Biboswan (See #1715)

Patch Changes

Patch Changes

Patch Changes

  • Improve OperationStore and subscription types to allow for result types of data that differ from the original Data type, which may be picked up from TypedDocumentNode, by @kitten (See #1731)
  • Use client.executeMutation rather than client.mutation, by @JoviDeCroock (See #1732)
  • Updated dependencies (See #1709)
urql - https://github.com/urql-graphql/urql/releases/tag/[email protected]

Published by urql-ci over 3 years ago

Patch Changes

  • ⚠️ Fix issue with useQuery's executeQuery state updates, where some calls wouldn't trigger a source change and start a request when the hook was paused, by @kitten (See #1722)
  • Updated dependencies (See #1709)

Patch Changes

  • Prevent stale results from being emitted by promisified query sources, e.g. client.query(...).toPromise() yielding a partial result with stale: true set. Instead, .toPromise() will now filter out stale results, by @kitten (See #1709)