+5
.changeset/giant-cheetahs-join.md
+5
.changeset/giant-cheetahs-join.md
+5
.changeset/strange-steaks-grow.md
+5
.changeset/strange-steaks-grow.md
+5
.changeset/stupid-mice-judge.md
+5
.changeset/stupid-mice-judge.md
+1
-2
docs/advanced/authentication.md
+1
-2
docs/advanced/authentication.md
···-import { createClient, dedupExchange, cacheExchange, fetchExchange, errorExchange, mapExchange } from 'urql';
+8
-10
docs/advanced/server-side-rendering.md
+8
-10
docs/advanced/server-side-rendering.md
···you'll need to instead provide them in the `exchanges` property of the returned client object.·····················
+1
-2
docs/api/auth-exchange.md
+1
-2
docs/api/auth-exchange.md
···
+1
-21
docs/api/core.md
+1
-21
docs/api/core.md
···| `suspense` | `?boolean` | Activates the experimental React suspense mode, which can be used during server-side rendering to prefetch data || `requestPolicy` | `?RequestPolicy` | Changes the default request policy that will be used. By default, this will be `cache-first`. || `preferGetMethod` | `?boolean \| 'force' \| 'within-url-limit'` | This is picked up by the `fetchExchange` and will force all queries (not mutations) to be sent using the HTTP GET method instead of POST if the length of the resulting URL doesn't exceed 2048 characters. When `'force'` is passed a GET request is always sent regardless of how long the resulting URL is. |-| `maskTypename` | `?boolean` | Enables the `Client` to automatically apply the `maskTypename` utility to all `data` on [`OperationResult`s](#operationresult). This makes the `__typename` properties non-enumerable. |···An exchange is defined to be a function that receives [`ExchangeInput`](#exchangeinput) and returnsan `ExchangeIO` function. The `ExchangeIO` function in turn will receive a stream of operations, and···The `fetchExchange` of type `Exchange` is responsible for sending operations of type `'query'` and···[Graphcache](../graphcache/README.md) to add `__typename` fields to GraphQL `DocumentNode`s.-This utility accepts a GraphQL `data` object, like `data` on [`OperationResult`s](#operationresult)-The [`formatDocument`](#formatdocument) is often used by `urql` automatically and adds `__typename`-fields to all results. However, this means that data often cannot be passed back into variables or-inputs on mutations, which is a common use-case. This utility hides these fields, which can solve
+1
-2
docs/api/execute-exchange.md
+1
-2
docs/api/execute-exchange.md
···
+1
-3
docs/api/graphcache.md
+1
-3
docs/api/graphcache.md
···
+3
-4
docs/api/refocus-exchange.md
+3
-4
docs/api/refocus-exchange.md
···-Then add it to your `Client`, preferably after the `dedupExchange` but in front of any asynchronous
+2
-3
docs/api/request-policy-exchange.md
+2
-3
docs/api/request-policy-exchange.md
···-Then add it to your `Client`, preferably after the `dedupExchange` but in front of any asynchronous+Then add it to your `Client`, preferably in front of the `cacheExchange` and in front of any asynchronous
+1
-2
exchanges/auth/README.md
+1
-2
exchanges/auth/README.md
···
+1
-2
exchanges/context/README.md
+1
-2
exchanges/context/README.md
···You'll then need to add the `contextExchange`, that this package exposes, to your `urql` Client, the positioning of this exchange depends on whether you set an async setter or not. If you set an async context-setter it's best placed after all the synchronous exchanges (in front of the fetchExchange).
+1
-2
exchanges/execute/README.md
+1
-2
exchanges/execute/README.md
···
+1
-2
exchanges/graphcache/README.md
+1
-2
exchanges/graphcache/README.md
···
+5
-6
exchanges/graphcache/benchmarks/urqlClient.js
+5
-6
exchanges/graphcache/benchmarks/urqlClient.js
···············
+1
-9
exchanges/graphcache/e2e-tests/query.spec.tsx
+1
-9
exchanges/graphcache/e2e-tests/query.spec.tsx
·········
-2
exchanges/graphcache/e2e-tests/updates.spec.tsx
-2
exchanges/graphcache/e2e-tests/updates.spec.tsx
······
+21
-2
exchanges/graphcache/src/store/store.test.ts
+21
-2
exchanges/graphcache/src/store/store.test.ts
······
-4
exchanges/graphcache/src/store/store.ts
-4
exchanges/graphcache/src/store/store.ts
···
-10
exchanges/graphcache/src/types.ts
-10
exchanges/graphcache/src/types.ts
···
+2
-4
exchanges/persisted/README.md
+2
-4
exchanges/persisted/README.md
······
+2
-2
exchanges/populate/README.md
+2
-2
exchanges/populate/README.md
···
+3
-3
exchanges/refocus/README.md
+3
-3
exchanges/refocus/README.md
···-Then add it to your `Client`, preferably after the `dedupExchange` but in front of any asynchronous+Then add it to your `Client`, preferably before the `cacheExchange` and in front of any asynchronous
+1
-2
exchanges/request-policy/README.md
+1
-2
exchanges/request-policy/README.md
···
+1
-32
packages/core/src/client.ts
+1
-32
packages/core/src/client.ts
······* This is the basis for how `urql` handles GraphQL operations, and exchanges handle the creation, execution,-* To easily get started you should consider using the {@link dedupExchange}, {@link cacheExchange} and {@link fetchExchange}+* To easily get started you should consider using the {@link cacheExchange} and {@link fetchExchange}* @see {@link https://urql.dev/goto/docs/architecture/#the-client-and-exchanges} for more information···-* By default, cache exchanges will alter your GraphQL documents to request `__typename` fields-* for all selections. However, this means that your GraphQL data will now contain `__typename` fields you-* it possible to directly pass objects from results as inputs to your mutation variables, it's-* Hint: With `@urql/exchange-graphcache` you will never need this option, as it selects fields on-* the client-side according to which fields you specified, rather than the fields it modified.-* @see {@link https://spec.graphql.org/October2021/#sec-Type-Name-Introspection} for more information···
-10
packages/core/src/exchanges/dedup.ts
-10
packages/core/src/exchanges/dedup.ts
-1
packages/core/src/exchanges/index.ts
-1
packages/core/src/exchanges/index.ts
-1
packages/core/src/index.ts
-1
packages/core/src/index.ts
-1
packages/core/src/utils/index.ts
-1
packages/core/src/utils/index.ts
-86
packages/core/src/utils/maskTypename.test.ts
-86
packages/core/src/utils/maskTypename.test.ts
···
-40
packages/core/src/utils/maskTypename.ts
-40
packages/core/src/utils/maskTypename.ts
···-* @see {@link ClientOptions.maskTypename} for a description of how the `Client` uses this utility.
+2
-2
packages/preact-urql/README.md
+2
-2
packages/preact-urql/README.md
···-import { createClient, dedupExchange, cacheExchange, fetchExchange, Provider, useQuery } from '@urql/preact';
+2
-3
packages/react-urql/e2e-tests/useQuery.spec.tsx
+2
-3
packages/react-urql/e2e-tests/useQuery.spec.tsx
·········
+2
-3
packages/react-urql/src/test-utils/ssr.test.tsx
+2
-3
packages/react-urql/src/test-utils/ssr.test.tsx
·········
+2
-2
packages/storage-rn/README.md
+2
-2
packages/storage-rn/README.md
······