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

  • Prevent Buffer from being polyfilled by an automatic detection in Webpack. Instead of referencing the Buffer global we now simply check the constructor name, by @kitten (See #2027)
  • ⚠️ Fix error-type of an ExecutionResult to line up with subscription-libs, by @JoviDeCroock (See #1998)

Changelog

v0.1.0

Initial Release

Patch Changes

  • ⚠️ Fix regression from #1869 that caused nullable lists to always cause a cache miss, if schema awareness is enabled, by @kitten (See #1983)
  • Updated dependencies (See #1985)

Patch Changes

  • Adding option to ssrExchange to include the extensions field of operation results in the cache, by @dios-david (See #1985)

Minor Changes

  • Allow passing in a Ref of client to provideClient and install, by @JoviDeCroock (See #1962)

Patch Changes

Patch Changes

Patch Changes

  • ⚠️ Fix issue where the ssr-exchange would loop due to checking network-only revalidations, by @JoviDeCroock (See #1944)
urql - https://github.com/urql-graphql/urql/releases/tag/[email protected]

Published by urql-ci about 3 years ago

Patch Changes

  • ⚠️ Fix issue where a paused query would not behave correctly when calling executeQuery, this scenario occured when the query has variables, there would be cases where on the first call it would think that the dependencies had changed (previous request vs current request) which made the source reset to null, by @JoviDeCroock (See #1982)
  • Updated dependencies (See #1944)

Patch Changes

Patch Changes

  • Remove hasNext: true flag from stale responses. This was erroneously added in debugging, but leads to stale responses being marked with hasNext, which means the dedupExchange will keep waiting for further network responses, by @kitten (See #1911)

Patch Changes

  • Cleanup the previous onOnline event-listener when called again, by @JoviDeCroock (See #1896)
urql - https://github.com/urql-graphql/urql/releases/tag/[email protected]

Published by urql-ci about 3 years ago

Patch Changes

  • ⚠️ Fix issue where the renderToString pass would keep looping due to reexecuting operations on the server, by @JoviDeCroock (See #1895)

Minor Changes

  • Add a new retryWith option which allows operations to be updated when a request is being retried, by @kitten (See #1881)

Patch Changes

Patch Changes

  • ⚠️ Fix mark query.__key as non-enumerable so formatDocument does not restore previous invocations when cloning the gql-ast, by @JoviDeCroock (See #1870)
  • ⚠️ Fix: update toPromise to exclude hasNext results. This change ensures that
    when we call toPromise() on a query we wont serve an incomplete result, the
    user will expect to receive a non-stale full-result when using toPromise(), by @JoviDeCroock (See #1880)

Patch Changes

  • ⚠️ Fix previous results' null values spilling into the next result that Graphcache issues, which may prevent updates from being issued until the query is reexecuted. This was affecting any null links on data, and any queries that were issued before non-optimistic mutations, by @kitten (See #1885)
  • Updated dependencies (See #1870 and #1880)

Minor Changes

Minor Changes

  • Support async iterated results, including subscriptions via AsyncIterator support and @defer / @stream if the appropriate version of graphql is used, e.g. 15.4.0-experimental-stream-defer.1, by @kitten (See #1854)

Patch Changes

Minor Changes

  • Improve referential equality of deeply queried objects from the normalised cache for queries. Each query operation will now reuse the last known result and only incrementally change references as necessary, scanning over the previous result to identify whether anything has changed.
    This should help improve the performance of processing updates in UI frameworks (e.g. in React with useMemo or React.memo). (See #1859)
  • Add experimental support for @defer and @stream responses for GraphQL. This implements the "GraphQL Defer and Stream Directives" and "Incremental Delivery over HTTP" specifications. If a GraphQL API supports multipart/mixed responses for deferred and streamed delivery of GraphQL results, @urql/core (and all its derived fetch implementations) will attempt to stream results. This is only supported on browsers supporting streamed fetch responses, which excludes IE11.
    The implementation of streamed multipart responses is derived from meros by @maraisr, and is subject to change if the RFCs end up changing, by @kitten (See #1854)

Patch Changes

  • ⚠️ Fix missing values cascading into lists causing a null item without the query being marked as stale and fetched from the API. This would happen in schema awareness when a required field, which isn't cached, cascades into a nullable list, by @kitten (See #1869)
  • Updated dependencies (See #1854)

Minor Changes

  • Add a staleWhileRevalidate option to the ssrExchange, which allows the client to immediately refetch a new result on hydration, which may be used for cached / stale SSR or SSG pages. This is different from using cache-and-network by default (which isn't recommended) as the ssrExchange typically acts like a "replacement fetch request", by @kitten (See #1852)

Patch Changes

  • ⚠️ Fix prevent mangling embedded strings in queries sent using the GET method, by @JoviDeCroock (See #1851)
  • The single-source behavior previously wasn't effective for implementations like React,
    where the issue presents itself when the state of an operation is first polled. This led to the operation being torn down erroneously.
    We now ensure that operations started at the same time still use a shared single-source, by @JoviDeCroock (See #1850)
urql - https://github.com/urql-graphql/urql/releases/tag/[email protected]

Published by urql-ci about 3 years ago

Minor Changes

  • Add new staleWhileRevalidate option from the ssrExchange addition to withUrqlClient's options. This is useful when Next.js is used in static site generation (SSG) mode, by @kitten (See #1852)

Patch Changes

  • Use the built-in next types for next-urql HOC return values, by @JoviDeCroock (See #1812)