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 visible (Hide)

urql -

Published by kitten over 4 years ago

Patch Changes

  • ⚠️ Fix timing for out-of-band client.reexecuteOperation calls. This would surface in asynchronous caching scenarios, where no result would be delivered by the cache synchronously, while it still calls client.reexecuteOperation for e.g. a network-only request, which happens for cache-and-network. This issue becomes especially obvious in highly synchronous frameworks like Svelte, by @kitten (See #860)
  • Replace unnecessary scheduleTask polyfill with inline Promise.resolve().then(fn) calls, by @kitten (See #861)
urql -

Published by kitten over 4 years ago

Patch Changes

  • Prevent serialization of the Client for withUrqlClient even if the target component doesn't have a getInitialProps method. Before this caused the client to not be initialised correctly on the client-side, by @JoviDeCroock (See #857)
urql -

Published by kitten over 4 years ago

To migrate to the new version, you will now have to pass a single function argument, instead
of two arguments to the withUrqlClient HOC helper. For instance, you would have to transform this:

export default withUrqlClient(
  ctx => ({
    url: '',
  }),
  ssrExchange => [dedupExchange, cacheExchange, ssrExchange, fetchExchange]
);

To look like the following:

export default withUrqlClient((ssrExchange, ctx) => ({
  url: '',
  exchanges: [dedupExchange, cacheExchange, ssrExchange, fetchExchange]
}), { ssr; true });

The second argument may now be used to pass { ssr: true } explicitly, when you are
wrapping a page without another getInitialProps method. This gives you better support
when you're implement custom methods like getStaticProps.

Major Changes

  • Change getInitialProps to be applied when the wrapped page getInitialProps or when { ssr: true } is passed as a second options object. This is to better support alternative methods like getStaticProps. By @JoviDeCroock (See #797)
  • Update the withUrqlClient function to remove the second argument formerly called mergeExchanges and merges it with the first argument.

Patch Changes

urql -

Published by kitten over 4 years ago

As always, please ensure that you deduplicate @urql/core when upgrading. Additionally
deduplicating the versions of wonka that you have installed may also reduce your bundlesize.

Minor Changes

  • Expose a client.subscription shortcut method, similar to client.query and client.mutation, by @FredyC (See #838)

Patch Changes

  • Upgrade to a minimum version of wonka@^4.0.14 to work around issues with React Native's minification builds, which use uglify-es and could lead to broken bundles, by @kitten (See #842)
urql -

Published by kitten over 4 years ago

Patch Changes

  • Upgrade to a minimum version of wonka@^4.0.14 to work around issues with React Native's minification builds, which use uglify-es and could lead to broken bundles, by @kitten (See #842)
  • Updated dependencies (See #838 and #842)
urql -

Published by kitten over 4 years ago

This major release comes with a couple of fixes and new experimental offline support, which
we're very excited for! Please give it a try if your application is targeting Offline First!

To migrate to this new major version, check the major breaking changes below. Mainly you will have
to watch out for cache.invalidateQuery which has been removed. Instead you should now invalidate
individual entities and fields using cache.invalidate. Learn more about this method on our
docs.

Major Changes

  • Remove the deprecated populateExchange export from @urql/exchange-graphcache.
    If you're using the populateExchange, please install the seprate @urql/exchange-populate package and import it from there, by @kitten (See #840)
  • The deprecated cache.invalidateQuery() method has been removed. Please migrate over to cache.invalidate() instead, which operates on individual fields instead of queries, by @kitten (See #840)

Minor Changes

Patch Changes

  • ⚠️ Fix resolvers being executed for data even when data is currently written. This behaviour could lead to interference with custom updaters that update fragments or queries, e.g. an updater that was receiving paginated data due to a pagination resolver. We've determined that generally it is undesirable to have any resolvers run during the cache update (writing) process, since it may lead to resolver data being accidentally written to the cache or for resolvers to interfere with custom user updates, by @olistic (See #812)
  • Upgrade to a minimum version of wonka@^4.0.14 to work around issues with React Native's minification builds, which use uglify-es and could lead to broken bundles, by @kitten (See #842)
  • Updated dependencies (See #838 and #842)
urql -

Published by kitten over 4 years ago

Patch Changes

  • Upgrade to a minimum version of wonka@^4.0.14 to work around issues with React Native's minification builds, which use uglify-es and could lead to broken bundles, by @kitten (See #842)
  • Updated dependencies (See #838 and #842)
urql -

Published by kitten over 4 years ago

Patch Changes

  • Upgrade to a minimum version of wonka@^4.0.14 to work around issues with React Native's minification builds, which use uglify-es and could lead to broken bundles, by @kitten (See #842)
  • Updated dependencies (See #838 and #842)
urql -

Published by kitten over 4 years ago

Patch Changes

  • Upgrade to a minimum version of wonka@^4.0.14 to work around issues with React Native's minification builds, which use uglify-es and could lead to broken bundles, by @kitten (See #842)
  • Updated dependencies (See #838 and #842)
urql -

Published by kitten over 4 years ago

Patch Changes

  • Upgrade to a minimum version of wonka@^4.0.14 to work around issues with React Native's minification builds, which use uglify-es and could lead to broken bundles, by @kitten (See #842)
  • Updated dependencies (See #838 and #842)
urql -

Published by kitten over 4 years ago

Patch Changes

  • Upgrade to a minimum version of wonka@^4.0.14 to work around issues with React Native's minification builds, which use uglify-es and could lead to broken bundles, by @kitten (See #842)
  • Updated dependencies (See #838 and #842)
urql -

Published by kitten over 4 years ago

Patch Changes

  • Upgrade to a minimum version of wonka@^4.0.14 to work around issues with React Native's minification builds, which use uglify-es and could lead to broken bundles, by @kitten (See #842)
  • Updated dependencies (See #838 and #842)
urql -

Published by kitten over 4 years ago

Patch Changes

  • Upgrade to a minimum version of wonka@^4.0.14 to work around issues with React Native's minification builds, which use uglify-es and could lead to broken bundles, by @kitten (See #842)
  • Updated dependencies (See #838 and #842)
urql -

Published by kitten over 4 years ago

Patch Changes

  • Upgrade to a minimum version of wonka@^4.0.14 to work around issues with React Native's minification builds, which use uglify-es and could lead to broken bundles, by @kitten (See #842)
  • Updated dependencies (See #838 and #842)
urql -

Published by kitten over 4 years ago

Major Changes

  • Change the persistedFetchExchange to be an exchange factory. The persistedFetchExchange now
    expects to be called with options. An optional option, preferGetForPersistedQueries, may now
    be passed to send persisted queries as a GET request, even when the Client's preferGetMethod
    option is false.

To migrate you will have to update your usage of persistedFetchExchange from

import { persistedFetchExchange } from '@urql/exchange-persisted-fetch';

createClient({
  exchanges: [
    persistedFetchExchange
  ],
});

to the following:

import { persistedFetchExchange } from '@urql/exchange-persisted-fetch';

createClient({
  exchanges: [
    // Call the exchange and pass optional options:
    persistedFetchExchange()
  ],
});
urql -

Published by kitten over 4 years ago

Patch Changes

  • Bump react-ssr-prepass so it can get eliminated in the client-side bundle, this because the 1.2.1 version added "sideEffects:false", by @JoviDeCroock (See #809)
urql -

Published by kitten over 4 years ago

Patch Changes

urql -

Published by kitten over 4 years ago

Initial Release

urql -

Published by kitten over 4 years ago

Minor Changes

  • Add deprecation notice, as exchange isn't as useful as expected and unstable, by @kitten (See #789)
urql -

Published by kitten over 4 years ago

Patch Changes

  • Add source debug name to all dispatchDebug calls during build time to identify events by which exchange dispatched them, by @JoviDeCroock (See #780)
  • Updated dependencies (See #780)