Releases: urql-graphql/urql
@urql/[email protected]
@urql/[email protected]
@urql/[email protected]
Patch Changes
- Update the
updater
function type ofcache.updateQuery
to have a return type ofDataFields
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]
@urql/[email protected]
Minor Changes
- Adds the
maskTypename
export to urql-core, this deeply masks typenames from the given payload.
Masking__typename
properties is also available as amaskTypename
option on theClient
. 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
v1.8.2
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.
v1.8.1
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
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.
- Support concurrent mode with all edge cases fully (see #496)
- Move to
[email protected]
with the prior fix in #496 (see #499)
v1.7.0
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
onGraphQLError
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
v1.6.2
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
andclient.mutation
, by @ctrlplusb (see #456) ⚠️ FixuseQuery
entering an infinite loop during SSR when an update is triggered (see #459)