The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] over 1 year ago
hasNext: true
is set, which indicates deferred or streamed resultssourcesContent
, including additional source files, and had incorrect paths in some of themwonka@^6.3.0
urql
bindings packagesPublished by github-actions[bot] over 1 year ago
share
calls, since @urql/core
’s composeExchanges
utility now automatically does so for uswonka@^6.3.0
Published by github-actions[bot] over 1 year ago
Client
from Context
. Previously, urql
kept a legacy default client in its context, with default exchanges and calling an API at /graphql
. This has now been removed and you will have to create your own Client
if you were relying on this behaviourhasNext: true
is set, which indicates deferred or streamed resultssourcesContent
, including additional source files, and had incorrect paths in some of themwonka@^6.3.0
urql
bindings packagesPublished by github-actions[bot] over 1 year ago
share
calls, since @urql/core
’s composeExchanges
utility now automatically does so for uswonka@^6.3.0
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
share
calls, since @urql/core
’s composeExchanges
utility now automatically does so for uswonka@^6.3.0
@urql/exchange-multipart-fetch
as behaviour has been absorbed into @urql/core
. If you're using the multipartFetchExchange
, you should now be able to simply remove itPublished by github-actions[bot] over 1 year ago
Client
from Context
. Previously, urql
kept a legacy default client in its context, with default exchanges and calling an API at /graphql
. This has now been removed and you will have to create your own Client
if you were relying on this behaviourhasNext: true
is set, which indicates deferred or streamed resultssourcesContent
, including additional source files, and had incorrect paths in some of themwonka@^6.3.0
urql
bindings packagesPublished by github-actions[bot] over 1 year ago
OperationResult.hasNext
and OperationResult.stale
to be required fields. If you have a custom exchange creating results, you'll have to add these fields or use the makeResult
, mergeResultPatch
, or makeErrorResult
helpershandler
, which combines subscription events, from mutationStore
to subscriptionStore
. It’s accidentally been defined and implemented on the wrong store and was meant to be on subscriptionStore
hasNext: true
is set, which indicates deferred or streamed resultssourcesContent
, including additional source files, and had incorrect paths in some of themwonka@^6.3.0
urql
bindings packagesPublished by github-actions[bot] over 1 year ago
wonka@^6.3.0
Published by github-actions[bot] over 1 year ago
share
calls, since @urql/core
’s composeExchanges
utility now automatically does so for ussourcesContent
, including additional source files, and had incorrect paths in some of themwonka@^6.3.0
didAuthError
keeps returning truePublished by github-actions[bot] over 1 year ago
wonka@^6.3.0
Published by github-actions[bot] over 1 year ago
Remove defaultExchanges
from @urql/core
and make exchanges
a required property on Client
construction.
In doing so we make the urql
package more tree-shakeable as the three default exchanges are in no code paths
meaning they can be removed if not used.
A migration would look as follows if you are currently creating a client without exchanges
import { createClient, cacheExchange, fetchExchange } from '@urql/core';
const client = createClient({
url: '',
exchanges: [cacheExchange, fetchExchange],
});
Submitted by @JoviDeCroock (See #3033)
Update subscriptionExchange
to receive FetchBody
instead. In the usual usage of subscriptionExchange
(for instance with graphql-ws
) you can expect no breaking changes. However, the key
and extensions
field has been removed and instead the forwardSubscription
function receives the full Operation
as a second argument
Submitted by @kitten (See #3054)
Remove dependence on graphql
package and replace it with @0no-co/graphql.web
, which reduces the default bundlesize impact of urql
packages to a minimum. All types should remain compatible, even if you use graphql
elsewhere in your app, and if other dependencies are using graphql
you may alias it to graphql-web-lite
Submitted by @kitten (See #3097)
Update OperationResult.hasNext
and OperationResult.stale
to be required fields. If you have a custom exchange creating results, you'll have to add these fields or use the makeResult
, mergeResultPatch
, or makeErrorResult
helpers
Submitted by @kitten (See #3061)
Remove getOperationName
export from @urql/core
Submitted by @kitten (See #3062)
OperationResultSource
from all Client
methods (which replaces PromisifiedSource
on shortcut methods). This allows not only toPromise()
to be called, but it can also be used as an awaitable PromiseLike
and has a .subscribe(onResult)
method aliasing the subscribe utility from wonka
subscriptionExchange
to support incremental results out of the box. If a subscription proactively completes, results are also now updated with hasNext: false
text/event-stream
response support. This generally adheres to the GraphQL SSE protocol and GraphQL Yoga push responses, and is an alternative to multipart/mixed
@urql/core
. This adds the File/Blob upload support to @urql/core
, which effectively deprecates @urql/exchange-multipart-fetch
GraphQLRequest.extensions
as spec-extensions input to GraphQL requestsfetchExchange
when fetchSubscriptions
is turned ondedupExchange
. The functionality of deduplicating queries and subscriptions has now been moved into and absorbed by the Client
.Client
already started doing some work to share results betweendedupExchange
would allow so as well, moving its logic into theClient
dedupExchange
did; by filtering out duplicate operations until either the original operation has been cancelled (teardown) or a first result (without hasNext: true
) has come insourcesContent
, including additional source files, and had incorrect paths in some of themmakeOperation
to be called with a partial OperationContext
when it’s called to copy an operation. When it receives an Operation
as a second argument now, the third argument, the context, will be spread into the prior operation.context
multipart/mixed
to end of Accept
header to avoid cauing Yoga to unnecessarily use itwonka@^6.3.0
Exchange
contract and composeExchanges
utility to remove the need to manually call share
on either incoming Source<Operation>
or forward()
’s Source<OperationResult>
. This is now taken care of internally in composeExchanges
and should make it easier for you to create custom exchanges and for us to explain themgraphql
’s built-in TypedQueryDocumentNode
typings for type inferenceSerializedResult
, SSRExchangeParams
, SSRExchange
, and SSRData
) to @urql/core
's type exportsGraphQLError
shape to rehydrate without passing through a GraphQLError
constructor in CombinedError
hasNext
and stale
passthroughs on caching exchangeserrors
from subsequent non-incremental resultsrequest.extensions.persistedQuery
to @urql/core
to omit sending query
as neededfromAsyncIterable
.CombinedError
s, while downstream errors are re-thrownClient
result source construction code and allow multiple mutationresult.hasNext
on a mutation result is set to true
, indicatingimport { visit } from 'graphql';
with smaller but functionally equivalent alternativePublished by github-actions[bot] over 1 year ago
Variables
type as passed to generics, that outputs a type of { [var: string]: never; }
.typescript-urql
, which wraps urql
's React hooks, generatestype Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
type Variables = Exact<{ [key: string]: never }>;
Submitted by @kitten (See #3029)Published by github-actions[bot] over 1 year ago
@urql/[email protected]
due to invalid 3.2.0
releasea84268db
)Published by github-actions[bot] over 1 year ago
variables
properties optional when a type from TypedDocumentNode
has no Variables
or all optional Variables
. Previously this would break for wrappers, e.g. in code generators, or when the type didn't quite match what we'd expectPublished by github-actions[bot] over 1 year ago
maxDepth
and skipType
into the populateExchange
, these options allow you to specifyPublished by github-actions[bot] over 1 year ago
variables
properties optional when a type from TypedDocumentNode
has no Variables
or all optional Variables
. Previously this would break for wrappers, e.g. in code generators, or when the type didn't quite match what we'd expectPublished by github-actions[bot] over 1 year ago
isOfflineError
option to the offlineExchange
to allow it to be customized to different conditions to determine whether an operation has failed because of a network errorupdates
config to react to arbitrary type updates other than just Mutation
and Subscription
fields.updates.Mutation
updated.Subscription
with a custom schema with custom root names, you‘ll get a warning sinceupdates
config to reflect this. This was a prior implementationstale: true
flag added to them. This is a regression from https://github.com/urql-graphql/urql/pull/2831 and only applies to cacheExchange
s that had the schema
option setinvariant
to data layer that prevents cache writes during cache query operations. This prevents cache.writeFragment
, cache.updateQuery
, and cache.link
from being called in resolvers
for instancePublished by github-actions[bot] over 1 year ago
variables
properties optional when a type from TypedDocumentNode
has no Variables
or all optional Variables
. Previously this would break for wrappers, e.g. in code generators, or when the type didn't quite match what we'd expect