Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.

chore(toe): update graphql-toe and add instructions to README (#3765)

authored by

Benjie and committed by
GitHub
21fc7660 e850c988

+25 -10
+5
.changeset/lucky-bears-promise.md
··· 1 + --- 2 + '@urql/exchange-throw-on-error': patch 3 + --- 4 + 5 + Update `graphql-toe` and add more detail to README.
+14 -2
exchanges/throw-on-error/README.md
··· 1 1 # @urql/exchange-throw-on-error (Exchange factory) 2 2 3 - `@urql/exchange-throw-on-error` is an exchange for the [`urql`](../../README.md) GraphQL client that makes field access to data throw an error if the field errored. 3 + `@urql/exchange-throw-on-error` is an exchange for the [`urql`](https://github.com/urql-graphql/urql) GraphQL client that throws on field access to errored fields. 4 4 5 - It is built on top of the [`graphql-toe`](https://github.com/graphile/graphql-toe) package. 5 + It is built on top of the [`graphql-toe`](https://github.com/graphile/graphql-toe) package - please see that package for more information. 6 6 7 7 ## Quick Start Guide 8 8 ··· 13 13 # or 14 14 npm install --save @urql/exchange-throw-on-error 15 15 ``` 16 + 17 + Then add the `throwOnErrorExchange`, to your client: 18 + 19 + ```js 20 + import { createClient, cacheExchange, fetchExchange } from 'urql'; 21 + import { throwOnErrorExchange } from '@urql/exchange-throw-on-error'; 22 + 23 + const client = createClient({ 24 + url: '/graphql', 25 + exchanges: [cacheExchange, throwOnErrorExchange(), fetchExchange], 26 + }); 27 + ```
+1 -1
exchanges/throw-on-error/package.json
··· 56 56 }, 57 57 "dependencies": { 58 58 "@urql/core": "workspace:^5.1.1", 59 - "graphql-toe": "0.1.2", 59 + "graphql-toe": "^1.0.0-rc.0", 60 60 "wonka": "^6.3.2" 61 61 }, 62 62 "publishConfig": {
+5 -7
pnpm-lock.yaml
··· 327 327 specifier: workspace:^5.1.1 328 328 version: link:../../packages/core 329 329 graphql-toe: 330 - specifier: 0.1.2 331 - version: 0.1.2 330 + specifier: ^1.0.0-rc.0 331 + version: 1.0.0-rc.0 332 332 wonka: 333 333 specifier: ^6.3.2 334 334 version: 6.3.2 ··· 5069 5069 graphemer@1.4.0: 5070 5070 resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} 5071 5071 5072 - graphql-toe@0.1.2: 5073 - resolution: {integrity: sha512-XK04wXEHbLY33YHoPAnLMIafRKSOn7FTWzTCob23GC6o8DnO4ibkA8Aje+Udee8QdXx46TV6m6LQM9iU8C9vwQ==} 5072 + graphql-toe@1.0.0-rc.0: 5073 + resolution: {integrity: sha512-/reEXGT1QCrQkweajQvbK298u/duyEHGftzKlFO0K3kD050USxD55bQw0QctjhCzKEZJIvdkoCxoUfijHv4izg==} 5074 5074 5075 5075 graphql@16.9.0: 5076 5076 resolution: {integrity: sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==} ··· 7628 7628 engines: {node: '>=0.6.0', teleport: '>=0.2.0'} 7629 7629 deprecated: |- 7630 7630 You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. 7631 - 7632 7631 (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) 7633 7632 7634 7633 q@1.5.1: ··· 7636 7635 engines: {node: '>=0.6.0', teleport: '>=0.2.0'} 7637 7636 deprecated: |- 7638 7637 You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. 7639 - 7640 7638 (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) 7641 7639 7642 7640 qs@6.10.4: ··· 15811 15809 15812 15810 graphemer@1.4.0: {} 15813 15811 15814 - graphql-toe@0.1.2: {} 15812 + graphql-toe@1.0.0-rc.0: {} 15815 15813 15816 15814 graphql@16.9.0: {} 15817 15815