Skip to content

Releases: urql-graphql/urql

@urql/[email protected]

13 Feb 15:46
1af30b8
Compare
Choose a tag to compare

Patch Changes

@urql/[email protected]

13 Feb 15:46
1af30b8
Compare
Choose a tag to compare

Patch Changes

@urql/[email protected]

13 Feb 15:45
1af30b8
Compare
Choose a tag to compare

Patch Changes

  • Update the updater function type of cache.updateQuery to have a return type of DataFields so that __typename does not need to be defined, by @JoviDeCroock (See #538)
  • ⚠️ Fix updates not being triggered when optimistic updates diverge from the actual result. (See #160)
  • Refactor away SchemaPredicates helper to reduce bundlesize. (See #161)
  • Ensure that pagination helpers don't confuse pages that have less params with a
    query that has more params. (See #156)
  • Updated dependencies (See #533, #519, #515, #512, and #518)

@urql/[email protected]

13 Feb 15:45
1af30b8
Compare
Choose a tag to compare

Minor Changes

  • Adds the maskTypename export to urql-core, this deeply masks typenames from the given payload.
    Masking __typename properties is also available as a maskTypename option on the Client. Setting this to true will
    strip typenames from results, by @JoviDeCroock (See #533)
  • Add support for sending queries using GET instead of POST method (See #519)
  • Add client.readQuery method (See #518)

Patch Changes

  • ⚠️ Fix ssrExchange not serialising networkError on CombinedErrors correctly. (See #515)
  • Add explicit error when creating Client without a URL in development. (See #512)

v1.8.2

13 Jan 19:13
d8ab31c
Compare
Choose a tag to compare

This patch fixes client-side suspense. While we wouldn't recommend its use
anymore, since suspense lends itself to prerendering instead of a loading
primitive, we'd like to ensure that suspense-mode works as expected in urql.

Also, as mentioned in v1.8.0's notes, please ensure that urql upgrades to
use wonka@^4.0.7 to avoid any issues. If your bundler or packager uses a
lower version with urql, you will see runtime errors.

  • Clean up unnecessary useMemo for useCallback in hooks (see #504)
  • Fix synchronous, client-side suspense and simplify toSuspenseSource helper (see #506)

v1.8.1

11 Jan 03:01
e06098d
Compare
Choose a tag to compare

This patch fixes urql relying on a quirk in older versions of wonka where
shared sources wouldn't cascade cancellations, which they now do. This meant
that when an app goes from some queries/subscriptions to having none at all,
the exchange pipeline would be stopped completely.

  • Fix exchange pipeline stalling when all queries end (see #503)

v1.8.0

10 Jan 16:21
c380448
Compare
Choose a tag to compare

This release doesn't change any major feature aspects, but comes with bugfixes
to our suspense and concurrent-mode handling. Due to an upgrade to wonka@^4.0.0
this is a minor version though.

In v1.6.0 we believed to
have solved all issues related to suspense and concurrent mode. However there were
still some remaining cases where concurrent mode behaved incorrectly. With the new
useOperator hook in [email protected] we believe
to have now fixed all issues.

The initial mount of useQuery and useSubscription will now synchronously reflect
whatever urql returns, most of the times those will be cached results. Afterwards
all subsequent updates and fetches will be scheduled cooperatively with React on
an effect.

If you're using wonka for an exchange with urql you may want to upgrade to wonka@^4.0.5 soon.
You can still use the older v3.2.2 which will work with the new version (even in the same bundle),
unless you're making use of its subscribe, make, or makeSubject exports.
A migration guide can be found in the wonka docs.

v1.7.0

12 Dec 16:41
3329005
Compare
Choose a tag to compare

This release splits our main package into two entrypoints. Importing from urql remains
unchanged, but internally this entrypoint uses urql/core, which doesn't contain any
React-related code. If you're building framework-agnostic libraries or apps without
React, you can now use urql/core directly.

  • Fix originalError on GraphQLError instances (see #470)
  • Fix stringifyVariables not using .toJSON() which prevented Dates from being stringified, by @BjoernRave (see #485)
  • Expose urql/core without any React code included (see #424)

v1.6.3

11 Nov 18:41
58f0889
Compare
Choose a tag to compare
  • Fix suspense-mode being erroneously activated when using client.query() (see #466)

v1.6.2

05 Nov 18:13
65b5b7b
Compare
Choose a tag to compare

This fixes a potentially critical bug, where a component would enter an infinite rerender loop,
when another hook triggers an update. This may happen when multiple useQuery hooks are used in
a single component or when another state hook triggers a synchronous update.

  • Add generic type-parameter to client.query and client.mutation, by @ctrlplusb (see #456)
  • ⚠️ Fix useQuery entering an infinite loop during SSR when an update is triggered (see #459)