chore(deps): update dependency @urql/core to v4 #411
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^2.4.0 || ^3.0.0
->^2.4.0 || ^3.0.0 || ^4.0.0
Release Notes
urql-graphql/urql
v4.0.0
Compare Source
Major Changes
defaultExchanges
from@urql/core
and makeexchanges
a required property onClient
construction.In doing so we make the
urql
package more tree-shakeable as the three default exchanges are in no code pathsmeaning they can be removed if not used.
A migration would look as follows if you are currently creating a client without exchanges
subscriptionExchange
to receiveFetchBody
instead. In the usual usage ofsubscriptionExchange
(for instance withgraphql-ws
) you can expect no breaking changes. However, thekey
andextensions
field has been removed and instead theforwardSubscription
function receives the fullOperation
as a second argumentSubmitted by @kitten (See #3054)
graphql
package and replace it with@0no-co/graphql.web
, which reduces the default bundlesize impact ofurql
packages to a minimum. All types should remain compatible, even if you usegraphql
elsewhere in your app, and if other dependencies are usinggraphql
you may alias it tographql-web-lite
Submitted by @kitten (See #3097)
OperationResult.hasNext
andOperationResult.stale
to be required fields. If you have a custom exchange creating results, you'll have to add these fields or use themakeResult
,mergeResultPatch
, ormakeErrorResult
helpersSubmitted by @kitten (See #3061)
getOperationName
export from@urql/core
Submitted by @kitten (See #3062)
Minor Changes
OperationResultSource
from allClient
methods (which replacesPromisifiedSource
on shortcut methods). This allows not onlytoPromise()
to be called, but it can also be used as an awaitablePromiseLike
and has a.subscribe(onResult)
method aliasing the subscribe utility fromwonka
Submitted by @kitten (See #3060)
subscriptionExchange
to support incremental results out of the box. If a subscription proactively completes, results are also now updated withhasNext: false
Submitted by @kitten (See #3055)
text/event-stream
response support. This generally adheres to the GraphQL SSE protocol and GraphQL Yoga push responses, and is an alternative tomultipart/mixed
Submitted by @kitten (See #3050)
@urql/core
. This adds the File/Blob upload support to@urql/core
, which effectively deprecates@urql/exchange-multipart-fetch
Submitted by @kitten (See #3051)
GraphQLRequest.extensions
as spec-extensions input to GraphQL requestsSubmitted by @kitten (See #3054)
fetchExchange
whenfetchSubscriptions
is turned onSubmitted by @kitten (See #3106)
dedupExchange
. The functionality of deduplicating queries and subscriptions has now been moved into and absorbed by theClient
.Previously, the
Client
already started doing some work to share results betweenqueries, and to avoid dispatching operations as needed. It now only dispatches operations
strictly when the
dedupExchange
would allow so as well, moving its logic into theClient
Submitted by @kitten (See #3058)
Patch Changes
dedupExchange
did; by filtering out duplicate operations until either the original operation has been cancelled (teardown) or a first result (withouthasNext: true
) has come inSubmitted by @kitten (See #3101)
sourcesContent
, including additional source files, and had incorrect paths in some of themSubmitted by @kitten (See #3053)
makeOperation
to be called with a partialOperationContext
when it’s called to copy an operation. When it receives anOperation
as a second argument now, the third argument, the context, will be spread into the prioroperation.context
Submitted by @kitten (See #3081)
multipart/mixed
to end ofAccept
header to avoid cauing Yoga to unnecessarily use itSubmitted by @JoviDeCroock (See #3039)
wonka@^6.3.0
Submitted by @kitten (See #3104)
Exchange
contract andcomposeExchanges
utility to remove the need to manually callshare
on either incomingSource<Operation>
orforward()
’sSource<OperationResult>
. This is now taken care of internally incomposeExchanges
and should make it easier for you to create custom exchanges and for us to explain themSubmitted by @kitten (See #3082)
graphql
’s built-inTypedQueryDocumentNode
typings for type inferenceSubmitted by @kitten (See #3085)
SerializedResult
,SSRExchangeParams
,SSRExchange
, andSSRData
) to@urql/core
's type exportsSubmitted by @kitten (See #3079)
GraphQLError
shape to rehydrate without passing through aGraphQLError
constructor inCombinedError
Submitted by @kitten (See #3087)
hasNext
andstale
passthroughs on caching exchangesSubmitted by @kitten (See #3059)
errors
from subsequent non-incremental resultsSubmitted by @kitten (See #3055)
request.extensions.persistedQuery
to@urql/core
to omit sendingquery
as neededSubmitted by @kitten (See #3057)
Submitted by @kitten (See #3062)
fromAsyncIterable
.This also further hardens our support for the "Incremental Delivery" specification and
refactors its implementation and covers more edge cases
Submitted by @kitten (See #3043)
CombinedError
s, while downstream errors are re-thrownSubmitted by @kitten (See #3063)
Client
result source construction code and allow multiple mutationresults, if
result.hasNext
on a mutation result is set totrue
, indicatingdeferred or streamed results
Submitted by @kitten (See #3102)
import { visit } from 'graphql';
with smaller but functionally equivalent alternativeSubmitted by @kitten (See #3097)
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.