This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@urql/next@1.0.0
Major Changes
Create @urql/next which is a package meant to support Next 13 and
the React 18 features contained within.
For server components we have @urql/next/rsc and for client components
just @urql/next
Submitted by @JoviDeCroock (See #3214)
@urql/exchange-graphcache@6.2.0
Minor Changes
Implement local directives. It’s now possible to add client-only directives to queries by adding them to the cacheExchange’s new directives option.
Directives accept an object of their arguments and return a resolver. When a field is annotated with
a resolver, e.g. @_optional or @_required, their resolvers from the directives config are
executed. This means it’s now possible to use @_relayPagination for example, by passing adding
the relayPagination helper to the config.
Due to the change in #3317, any directive in
queries that’s prefixed with an underscore (_) is only visible to Graphcache and not the API.
Submitted by undefined (See https://github.com/urql-graphql/urql/pull/3306)
Patch Changes
Use new FormattedNode / formatDocument functionality added to @urql/core to slightly speed up directive processing by using the client-side _directives dictionary that formatDocument adds
Submitted by @kitten (See #3317)
Allow offlineExchange to once again issue all request policies, instead of mapping them to cache-first. When replaying operations after rehydrating it will now prioritise network policies, and before rehydrating receiving a network result will prevent a network request from being issued again
Submitted by @kitten (See #3308)
Add OperationContext.optimistic flag as an internal indication on whether a mutation triggered an optimistic update in @urql/exchange-graphcache's cacheExchange
Submitted by @kitten (See #3308)
Allow persisted query logic to be skipped by the persistedExchange if the passed generateHash function resolves to a nullish value. This allows (A)PQ to be selectively disabled for individual operations
Submitted by @kitten (See #3324)
Update formatDocument to output FormattedNode type mapping. The formatter will now annotate added __typename fields with _generated: true, place selection nodes' directives onto a _directives dictionary, and will filter directives to not include "_" underscore prefixed directives in the final query. This prepares us for a feature that allows enhanced client-side directives in Graphcache
Submitted by @kitten (See #3317)
Patch Changes
Add OperationContext.optimistic flag as an internal indication on whether a mutation triggered an optimistic update in @urql/exchange-graphcache's cacheExchange
Submitted by @kitten (See #3308)
urql@4.0.5
Patch Changes
⚠️ Fix edge case that causes execute functions from useQuery and useSubscription to fail when they’re called in their state after a render that changes pause. This would previously cause internal dependencies to be outdated and the source to be discarded immediately in some cases
Submitted by @kitten (See #3323)
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@urql/next@1.0.0
Major Changes
@urql/next
which is a package meant to support Next 13 and the React 18 features contained within. For server components we have@urql/next/rsc
and for client components just@urql/next
Submitted by @JoviDeCroock (See #3214)@urql/exchange-graphcache@6.2.0
Minor Changes
cacheExchange
’s newdirectives
option. Directives accept an object of their arguments and return a resolver. When a field is annotated with a resolver, e.g.@_optional
or@_required
, their resolvers from thedirectives
config are executed. This means it’s now possible to use@_relayPagination
for example, by passing adding therelayPagination
helper to the config. Due to the change in #3317, any directive in queries that’s prefixed with an underscore (_
) is only visible to Graphcache and not the API. Submitted by undefined (See https://github.com/urql-graphql/urql/pull/3306)Patch Changes
FormattedNode
/formatDocument
functionality added to@urql/core
to slightly speed up directive processing by using the client-side_directives
dictionary thatformatDocument
adds Submitted by @kitten (See #3317)offlineExchange
to once again issue all request policies, instead of mapping them tocache-first
. When replaying operations after rehydrating it will now prioritise network policies, and before rehydrating receiving a network result will prevent a network request from being issued again Submitted by @kitten (See #3308)OperationContext.optimistic
flag as an internal indication on whether a mutation triggered an optimistic update in@urql/exchange-graphcache
'scacheExchange
Submitted by @kitten (See #3308)@urql/exchange-persisted@4.1.0
Minor Changes
persistedExchange
if the passedgenerateHash
function resolves to a nullish value. This allows (A)PQ to be selectively disabled for individual operations Submitted by @kitten (See #3324)Patch Changes
@urql/core@4.1.0
Minor Changes
formatDocument
to outputFormattedNode
type mapping. The formatter will now annotate added__typename
fields with_generated: true
, place selection nodes' directives onto a_directives
dictionary, and will filter directives to not include"_"
underscore prefixed directives in the final query. This prepares us for a feature that allows enhanced client-side directives in Graphcache Submitted by @kitten (See #3317)Patch Changes
OperationContext.optimistic
flag as an internal indication on whether a mutation triggered an optimistic update in@urql/exchange-graphcache
'scacheExchange
Submitted by @kitten (See #3308)urql@4.0.5
Patch Changes
useQuery
anduseSubscription
to fail when they’re called in their state after a render that changespause
. This would previously cause internal dependencies to be outdated and the source to be discarded immediately in some cases Submitted by @kitten (See #3323)