From ffd9f1663be49c77ea58c84664103148535be6bd Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Tue, 7 Dec 2021 15:58:19 +0000 Subject: [PATCH 1/7] Upgrade devDependencies to graphql@^16.0.0 --- exchanges/auth/package.json | 2 +- exchanges/execute/package.json | 2 +- exchanges/graphcache/package.json | 2 +- exchanges/multipart-fetch/package.json | 2 +- exchanges/persisted-fetch/package.json | 2 +- exchanges/populate/package.json | 2 +- exchanges/refocus/package.json | 2 +- exchanges/request-policy/package.json | 2 +- exchanges/retry/package.json | 2 +- package.json | 2 +- packages/core/package.json | 2 +- packages/introspection/package.json | 2 +- packages/next-urql/package.json | 2 +- packages/preact-urql/package.json | 2 +- packages/react-urql/package.json | 2 +- packages/storybook-addon/package.json | 2 +- packages/svelte-urql/package.json | 2 +- packages/vue-urql/package.json | 2 +- yarn.lock | 35 ++++++-------------------- 19 files changed, 25 insertions(+), 46 deletions(-) diff --git a/exchanges/auth/package.json b/exchanges/auth/package.json index 5c12acd673..a6aa376228 100644 --- a/exchanges/auth/package.json +++ b/exchanges/auth/package.json @@ -58,7 +58,7 @@ "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" }, "devDependencies": { - "graphql": "^15.4.0" + "graphql": "^16.0.0" }, "publishConfig": { "access": "public" diff --git a/exchanges/execute/package.json b/exchanges/execute/package.json index 91db1d34eb..67b2506aed 100644 --- a/exchanges/execute/package.json +++ b/exchanges/execute/package.json @@ -58,7 +58,7 @@ "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" }, "devDependencies": { - "graphql": "^15.4.0" + "graphql": "^16.0.0" }, "publishConfig": { "access": "public" diff --git a/exchanges/graphcache/package.json b/exchanges/graphcache/package.json index adcb0d6467..f9038cf1c2 100644 --- a/exchanges/graphcache/package.json +++ b/exchanges/graphcache/package.json @@ -72,7 +72,7 @@ "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" }, "devDependencies": { - "graphql": "^15.4.0" + "graphql": "^16.0.0" }, "publishConfig": { "access": "public" diff --git a/exchanges/multipart-fetch/package.json b/exchanges/multipart-fetch/package.json index 32067e732b..7c173fb118 100644 --- a/exchanges/multipart-fetch/package.json +++ b/exchanges/multipart-fetch/package.json @@ -57,7 +57,7 @@ "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" }, "devDependencies": { - "graphql": "^15.4.0" + "graphql": "^16.0.0" }, "publishConfig": { "access": "public" diff --git a/exchanges/persisted-fetch/package.json b/exchanges/persisted-fetch/package.json index 5c1ddb8367..5a4cd4834b 100644 --- a/exchanges/persisted-fetch/package.json +++ b/exchanges/persisted-fetch/package.json @@ -56,7 +56,7 @@ "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" }, "devDependencies": { - "graphql": "^15.4.0" + "graphql": "^16.0.0" }, "publishConfig": { "access": "public" diff --git a/exchanges/populate/package.json b/exchanges/populate/package.json index ac9b994a3a..f1fe3d2bc3 100644 --- a/exchanges/populate/package.json +++ b/exchanges/populate/package.json @@ -56,7 +56,7 @@ "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" }, "devDependencies": { - "graphql": "^15.4.0" + "graphql": "^16.0.0" }, "publishConfig": { "access": "public" diff --git a/exchanges/refocus/package.json b/exchanges/refocus/package.json index d0f06e1645..72c825ccf1 100644 --- a/exchanges/refocus/package.json +++ b/exchanges/refocus/package.json @@ -52,7 +52,7 @@ }, "devDependencies": { "@types/react": "^17.0.4", - "graphql": "^15.4.0" + "graphql": "^16.0.0" }, "peerDependencies": { "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" diff --git a/exchanges/request-policy/package.json b/exchanges/request-policy/package.json index 27b9b603ad..33ee1bf04b 100644 --- a/exchanges/request-policy/package.json +++ b/exchanges/request-policy/package.json @@ -50,7 +50,7 @@ "preset": "../../scripts/jest/preset" }, "devDependencies": { - "graphql": "^15.4.0" + "graphql": "^16.0.0" }, "peerDependencies": { "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" diff --git a/exchanges/retry/package.json b/exchanges/retry/package.json index cfcc215ae9..c87e9924c1 100644 --- a/exchanges/retry/package.json +++ b/exchanges/retry/package.json @@ -50,7 +50,7 @@ "preset": "../../scripts/jest/preset" }, "devDependencies": { - "graphql": "^15.4.0" + "graphql": "^16.0.0" }, "peerDependencies": { "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" diff --git a/package.json b/package.json index 9db2e9fedc..96be919cbb 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "eslint-plugin-react-hooks": "^4.2.0", "execa": "^5.0.0", "glob": "^7.1.6", - "graphql": "^15.5.0", + "graphql": "^16.0.0", "husky-v4": "^4.3.8", "invariant": "^2.2.4", "jest": "^26.6.3", diff --git a/packages/core/package.json b/packages/core/package.json index 0bde5d02ea..71491b2830 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -56,7 +56,7 @@ "preset": "../../scripts/jest/preset" }, "devDependencies": { - "graphql": "^15.4.0" + "graphql": "^16.0.0" }, "peerDependencies": { "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" diff --git a/packages/introspection/package.json b/packages/introspection/package.json index f8fe984530..05aa712ae5 100644 --- a/packages/introspection/package.json +++ b/packages/introspection/package.json @@ -48,7 +48,7 @@ "preset": "../../scripts/jest/preset" }, "devDependencies": { - "graphql": "^15.4.0" + "graphql": "^16.0.0" }, "peerDependencies": { "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" diff --git a/packages/next-urql/package.json b/packages/next-urql/package.json index 7695fa34a8..72cbaa0fe6 100644 --- a/packages/next-urql/package.json +++ b/packages/next-urql/package.json @@ -42,7 +42,7 @@ "@types/react-dom": "^17.0.3", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.2", - "graphql": "^15.4.0", + "graphql": "^16.0.0", "next": "^11.0.1", "react": "^17.0.1", "react-dom": "^17.0.1", diff --git a/packages/preact-urql/package.json b/packages/preact-urql/package.json index 1abe86b9f8..9d52675204 100644 --- a/packages/preact-urql/package.json +++ b/packages/preact-urql/package.json @@ -52,7 +52,7 @@ }, "devDependencies": { "@testing-library/preact": "^2.0.0", - "graphql": "^15.4.0", + "graphql": "^16.0.0", "preact": "^10.5.5" }, "peerDependencies": { diff --git a/packages/react-urql/package.json b/packages/react-urql/package.json index 8a4bc413cc..1a668c9ace 100644 --- a/packages/react-urql/package.json +++ b/packages/react-urql/package.json @@ -47,7 +47,7 @@ "@testing-library/react-hooks": "^5.1.2", "@types/react": "^17.0.4", "@types/react-test-renderer": "^17.0.1", - "graphql": "^15.4.0", + "graphql": "^16.0.0", "react": "^17.0.1", "react-dom": "^17.0.1", "react-is": "^17.0.1", diff --git a/packages/storybook-addon/package.json b/packages/storybook-addon/package.json index a821538f87..cffcd58ab7 100644 --- a/packages/storybook-addon/package.json +++ b/packages/storybook-addon/package.json @@ -45,7 +45,7 @@ "@types/webpack-env": "^1.15.3", "@urql/devtools": "^2.0.2", "@urql/preact": ">=2.0.2", - "graphql": "^15.4.0", + "graphql": "^16.0.0", "preact": "^10.5.5", "react": "^17.0.1", "urql": ">=2.0.3", diff --git a/packages/svelte-urql/package.json b/packages/svelte-urql/package.json index 6c9a4e0b3b..e6ddd135f0 100644 --- a/packages/svelte-urql/package.json +++ b/packages/svelte-urql/package.json @@ -59,7 +59,7 @@ "wonka": "^4.0.14" }, "devDependencies": { - "graphql": "^15.4.0", + "graphql": "^16.0.0", "svelte": "^3.20.0" }, "publishConfig": { diff --git a/packages/vue-urql/package.json b/packages/vue-urql/package.json index a50dd7c946..17e94f8e43 100644 --- a/packages/vue-urql/package.json +++ b/packages/vue-urql/package.json @@ -51,7 +51,7 @@ "preset": "../../scripts/jest/preset" }, "devDependencies": { - "graphql": "^15.1.0", + "graphql": "^16.0.0", "vue": "^3.0.11" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index bc8d5debee..f0149dd849 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4429,7 +4429,7 @@ browserslist@4.14.2: escalade "^3.0.2" node-releases "^1.1.61" -browserslist@4.16.6: +browserslist@4.16.6, browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.5: version "4.16.6" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2" integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ== @@ -4440,17 +4440,6 @@ browserslist@4.16.6: escalade "^3.1.1" node-releases "^1.1.71" -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.5: - version "4.16.5" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.5.tgz#952825440bca8913c62d0021334cbe928ef062ae" - integrity sha512-C2HAjrM1AI/djrpAUU/tr4pml1DqLIzJKSLDBXBrNErl9ZCCTXdhwxdJjYc16953+mBWf7Lw+uUJgpgb8cN71A== - dependencies: - caniuse-lite "^1.0.30001214" - colorette "^1.2.2" - electron-to-chromium "^1.3.719" - escalade "^3.1.1" - node-releases "^1.1.71" - bser@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" @@ -4723,12 +4712,7 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001214: - version "1.0.30001219" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001219.tgz#5bfa5d0519f41f993618bd318f606a4c4c16156b" - integrity sha512-c0yixVG4v9KBc/tQ2rlbB3A/bgBFRvl8h8M4IeUbqCca4gsiCfvtaheUssbnux/Mb66Vjz7x8yYjDgYcNQOhyQ== - -caniuse-lite@^1.0.30001202, caniuse-lite@^1.0.30001219, caniuse-lite@^1.0.30001228: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001202, caniuse-lite@^1.0.30001219, caniuse-lite@^1.0.30001228: version "1.0.30001245" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001245.tgz#45b941bbd833cb0fa53861ff2bae746b3c6ca5d4" integrity sha512-768fM9j1PKXpOCKws6eTo3RHmvTUsG9UrpT4WoREFeZgJBTi4/X9g565azS/rVUGtqb8nt7FjLeF5u4kukERnA== @@ -6460,12 +6444,7 @@ ejs@^2.6.1: resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== -electron-to-chromium@^1.3.564, electron-to-chromium@^1.3.719: - version "1.3.723" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.723.tgz#52769a75635342a4db29af5f1e40bd3dad02c877" - integrity sha512-L+WXyXI7c7+G1V8ANzRsPI5giiimLAUDC6Zs1ojHHPhYXb3k/iTABFmWjivEtsWrRQymjnO66/rO2ZTABGdmWg== - -electron-to-chromium@^1.3.723: +electron-to-chromium@^1.3.564, electron-to-chromium@^1.3.723: version "1.3.779" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.779.tgz#de55492a756deec63424f89fbe62aec9776f0e6d" integrity sha512-nreave0y/1Qhmo8XtO6C/LpawNyC6U26+q7d814/e+tIqUK073pM+4xW7WUXyqCRa5K4wdxHmNMBAi8ap9nEew== @@ -8187,10 +8166,10 @@ grapheme-splitter@^1.0.4: resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== -graphql@^15.1.0, graphql@^15.4.0, graphql@^15.5.0: - version "15.5.0" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.5.0.tgz#39d19494dbe69d1ea719915b578bf920344a69d5" - integrity sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA== +graphql@^16.0.0: + version "16.0.1" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.0.1.tgz#93a13cd4e0e38ca8d0832e79614c8578bfd34f10" + integrity sha512-oPvCuu6dlLdiz8gZupJ47o1clgb72r1u8NDBcQYjcV6G/iEdmE11B1bBlkhXRvV0LisP/SXRFP7tT6AgaTjpzg== growly@^1.3.0: version "1.3.0" From ef21640ecce36ecdbbc05c91ea7853abd4cfd7a6 Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Tue, 7 Dec 2021 16:01:35 +0000 Subject: [PATCH 2/7] Raise peerDependencies on graphql to include ^16.0.0 --- exchanges/auth/package.json | 2 +- exchanges/execute/package.json | 2 +- exchanges/graphcache/package.json | 2 +- exchanges/multipart-fetch/package.json | 2 +- exchanges/persisted-fetch/package.json | 2 +- exchanges/populate/package.json | 2 +- exchanges/refocus/package.json | 2 +- exchanges/request-policy/package.json | 2 +- exchanges/retry/package.json | 2 +- packages/core/package.json | 2 +- packages/introspection/package.json | 2 +- packages/preact-urql/package.json | 2 +- packages/react-urql/package.json | 2 +- packages/svelte-urql/package.json | 2 +- packages/vue-urql/package.json | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/exchanges/auth/package.json b/exchanges/auth/package.json index a6aa376228..57fd34986d 100644 --- a/exchanges/auth/package.json +++ b/exchanges/auth/package.json @@ -55,7 +55,7 @@ "wonka": "^4.0.14" }, "peerDependencies": { - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" }, "devDependencies": { "graphql": "^16.0.0" diff --git a/exchanges/execute/package.json b/exchanges/execute/package.json index 67b2506aed..6966e58bcf 100644 --- a/exchanges/execute/package.json +++ b/exchanges/execute/package.json @@ -55,7 +55,7 @@ "wonka": "^4.0.14" }, "peerDependencies": { - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" }, "devDependencies": { "graphql": "^16.0.0" diff --git a/exchanges/graphcache/package.json b/exchanges/graphcache/package.json index f9038cf1c2..145e020a25 100644 --- a/exchanges/graphcache/package.json +++ b/exchanges/graphcache/package.json @@ -69,7 +69,7 @@ "wonka": "^4.0.14" }, "peerDependencies": { - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" }, "devDependencies": { "graphql": "^16.0.0" diff --git a/exchanges/multipart-fetch/package.json b/exchanges/multipart-fetch/package.json index 7c173fb118..f423ee69e2 100644 --- a/exchanges/multipart-fetch/package.json +++ b/exchanges/multipart-fetch/package.json @@ -54,7 +54,7 @@ "wonka": "^4.0.14" }, "peerDependencies": { - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" }, "devDependencies": { "graphql": "^16.0.0" diff --git a/exchanges/persisted-fetch/package.json b/exchanges/persisted-fetch/package.json index 5a4cd4834b..3c903892bc 100644 --- a/exchanges/persisted-fetch/package.json +++ b/exchanges/persisted-fetch/package.json @@ -53,7 +53,7 @@ "wonka": "^4.0.14" }, "peerDependencies": { - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" }, "devDependencies": { "graphql": "^16.0.0" diff --git a/exchanges/populate/package.json b/exchanges/populate/package.json index f1fe3d2bc3..93ae011cbe 100644 --- a/exchanges/populate/package.json +++ b/exchanges/populate/package.json @@ -53,7 +53,7 @@ "wonka": "^4.0.14" }, "peerDependencies": { - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" }, "devDependencies": { "graphql": "^16.0.0" diff --git a/exchanges/refocus/package.json b/exchanges/refocus/package.json index 72c825ccf1..9c14948649 100644 --- a/exchanges/refocus/package.json +++ b/exchanges/refocus/package.json @@ -55,7 +55,7 @@ "graphql": "^16.0.0" }, "peerDependencies": { - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" }, "dependencies": { "@urql/core": ">=2.1.0", diff --git a/exchanges/request-policy/package.json b/exchanges/request-policy/package.json index 33ee1bf04b..4f36337915 100644 --- a/exchanges/request-policy/package.json +++ b/exchanges/request-policy/package.json @@ -53,7 +53,7 @@ "graphql": "^16.0.0" }, "peerDependencies": { - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" }, "dependencies": { "@urql/core": ">=2.1.5", diff --git a/exchanges/retry/package.json b/exchanges/retry/package.json index c87e9924c1..a72bf78bbd 100644 --- a/exchanges/retry/package.json +++ b/exchanges/retry/package.json @@ -53,7 +53,7 @@ "graphql": "^16.0.0" }, "peerDependencies": { - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" }, "dependencies": { "@urql/core": ">=2.3.1", diff --git a/packages/core/package.json b/packages/core/package.json index 71491b2830..2935bf355a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -59,7 +59,7 @@ "graphql": "^16.0.0" }, "peerDependencies": { - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" }, "dependencies": { "@graphql-typed-document-node/core": "^3.1.0", diff --git a/packages/introspection/package.json b/packages/introspection/package.json index 05aa712ae5..123224427c 100644 --- a/packages/introspection/package.json +++ b/packages/introspection/package.json @@ -51,7 +51,7 @@ "graphql": "^16.0.0" }, "peerDependencies": { - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" }, "dependencies": {}, "publishConfig": { diff --git a/packages/preact-urql/package.json b/packages/preact-urql/package.json index 9d52675204..78df52410c 100644 --- a/packages/preact-urql/package.json +++ b/packages/preact-urql/package.json @@ -56,7 +56,7 @@ "preact": "^10.5.5" }, "peerDependencies": { - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0", + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", "preact": ">= 10.0.0" }, "dependencies": { diff --git a/packages/react-urql/package.json b/packages/react-urql/package.json index 1a668c9ace..2efe8cad01 100644 --- a/packages/react-urql/package.json +++ b/packages/react-urql/package.json @@ -55,7 +55,7 @@ "react-test-renderer": "^17.0.1" }, "peerDependencies": { - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0", + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", "react": ">= 16.8.0" }, "dependencies": { diff --git a/packages/svelte-urql/package.json b/packages/svelte-urql/package.json index e6ddd135f0..870ca94a1e 100644 --- a/packages/svelte-urql/package.json +++ b/packages/svelte-urql/package.json @@ -51,7 +51,7 @@ "preset": "../../scripts/jest/preset" }, "peerDependencies": { - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0", + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", "svelte": "^3.0.0" }, "dependencies": { diff --git a/packages/vue-urql/package.json b/packages/vue-urql/package.json index 17e94f8e43..c3052bca59 100644 --- a/packages/vue-urql/package.json +++ b/packages/vue-urql/package.json @@ -55,7 +55,7 @@ "vue": "^3.0.11" }, "peerDependencies": { - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0", + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", "vue": "^3.0.0" }, "dependencies": { From 09f83618bc11673b693a256dff31df34fab817a1 Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Tue, 7 Dec 2021 16:07:42 +0000 Subject: [PATCH 3/7] Fix up minor typing issues --- exchanges/graphcache/src/ast/variables.ts | 2 +- .../populate/src/populateExchange.test.ts | 19 +++++++++++++------ exchanges/populate/src/populateExchange.ts | 5 +++-- .../src/getIntrospectedSchema.ts | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/exchanges/graphcache/src/ast/variables.ts b/exchanges/graphcache/src/ast/variables.ts index a708e36173..aa88e3fab8 100644 --- a/exchanges/graphcache/src/ast/variables.ts +++ b/exchanges/graphcache/src/ast/variables.ts @@ -50,7 +50,7 @@ export const filterVariables = ( /** Returns a normalized form of variables with defaulted values */ export const normalizeVariables = ( node: OperationDefinitionNode, - input: void | object + input: void | Record ): Variables => { const vars = {}; if (!input) return vars; diff --git a/exchanges/populate/src/populateExchange.test.ts b/exchanges/populate/src/populateExchange.test.ts index 33276a51fc..1d0f013e30 100644 --- a/exchanges/populate/src/populateExchange.test.ts +++ b/exchanges/populate/src/populateExchange.test.ts @@ -5,6 +5,7 @@ import { visit, DocumentNode, ASTKindToNode, + Kind, } from 'graphql'; import { fromValue, pipe, fromArray, toArray } from 'wonka'; @@ -314,9 +315,12 @@ describe('on (query w/ fragment) -> mutation', () => { toArray ); - const fragments = getNodesByType(response[1].query, 'FragmentDefinition'); + const fragments = getNodesByType( + response[1].query, + Kind.FRAGMENT_DEFINITION + ); expect( - fragments.filter(f => f.name.value === 'TodoFragment') + fragments.filter(f => 'name' in f && f.name.value === 'TodoFragment') ).toHaveLength(1); }); }); @@ -390,9 +394,12 @@ describe('on (query w/ unused fragment) -> mutation', () => { toArray ); - const fragments = getNodesByType(response[1].query, 'FragmentDefinition'); + const fragments = getNodesByType( + response[1].query, + Kind.FRAGMENT_DEFINITION + ); expect( - fragments.filter(f => f.name.value === 'UserFragment') + fragments.filter(f => 'name' in f && f.name.value === 'UserFragment') ).toHaveLength(0); }); }); @@ -584,8 +591,8 @@ describe('on query -> teardown -> mutation', () => { populateExchange({ schema })(exchangeArgs), toArray ); - getNodesByType(response[2].query, 'Field').forEach(field => { - expect(field.name.value).toMatch(/addTodo|__typename/); + getNodesByType(response[2].query, Kind.FIELD).forEach(field => { + expect((field as any).name.value).toMatch(/addTodo|__typename/); }); }); }); diff --git a/exchanges/populate/src/populateExchange.ts b/exchanges/populate/src/populateExchange.ts index 26009717ea..f9a0f34476 100644 --- a/exchanges/populate/src/populateExchange.ts +++ b/exchanges/populate/src/populateExchange.ts @@ -1,4 +1,5 @@ import { + ASTNode, DocumentNode, buildClientSchema, FragmentDefinitionNode, @@ -248,7 +249,7 @@ export const addFragmentsToQuery = ( return traverse( query, - node => { + (node: ASTNode): ASTNode | void => { if (node.kind === Kind.DOCUMENT) { node.definitions.reduce((set, definition) => { if (definition.kind === Kind.FRAGMENT_DEFINITION) { @@ -332,7 +333,7 @@ export const addFragmentsToQuery = ( selectionSet: { kind: Kind.SELECTION_SET, selections, - }, + } as SelectionSetNode, }; } }, diff --git a/packages/introspection/src/getIntrospectedSchema.ts b/packages/introspection/src/getIntrospectedSchema.ts index 174d456832..c566a46f93 100644 --- a/packages/introspection/src/getIntrospectedSchema.ts +++ b/packages/introspection/src/getIntrospectedSchema.ts @@ -22,7 +22,7 @@ export const getIntrospectedSchema = ( return input; } - const initialIntrospection = executeSync({ + const initialIntrospection: any = executeSync({ document: parse(getIntrospectionQuery({ descriptions: false })), schema: input as GraphQLSchema, }); From 0114e5bf740e472a41346a2613fbf331a6223da1 Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Tue, 7 Dec 2021 16:08:27 +0000 Subject: [PATCH 4/7] Add changeset --- .changeset/silver-ads-fry.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .changeset/silver-ads-fry.md diff --git a/.changeset/silver-ads-fry.md b/.changeset/silver-ads-fry.md new file mode 100644 index 0000000000..4058bebec2 --- /dev/null +++ b/.changeset/silver-ads-fry.md @@ -0,0 +1,21 @@ +--- +'@urql/exchange-auth': patch +'@urql/exchange-execute': patch +'@urql/exchange-graphcache': patch +'@urql/exchange-multipart-fetch': patch +'@urql/exchange-persisted-fetch': patch +'@urql/exchange-populate': patch +'@urql/exchange-refocus': patch +'@urql/exchange-request-policy': patch +'@urql/exchange-retry': patch +'@urql/core': patch +'@urql/introspection': patch +'next-urql': patch +'@urql/preact': patch +'urql': patch +'@urql/storybook-addon': patch +'@urql/svelte': patch +'@urql/vue': patch +--- + +Extend peer dependency range of `graphql` to include `^16.0.0` From 31158deb5877d49817bd301ce5fcbd9aa05ff46b Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Tue, 7 Dec 2021 23:22:35 +0000 Subject: [PATCH 5/7] Update snapshots --- .../multipartFetchExchange.test.ts.snap | 100 +---------------- .../persistedFetchExchange.test.ts.snap | 8 +- .../__snapshots__/fetch.test.ts.snap | 65 +---------- .../__snapshots__/subscription.test.ts.snap | 17 --- packages/core/src/gql.test.ts | 6 +- .../__snapshots__/fetchSource.test.ts.snap | 105 ------------------ packages/core/src/utils/typenames.test.ts | 35 +++--- 7 files changed, 24 insertions(+), 312 deletions(-) diff --git a/exchanges/multipart-fetch/src/__snapshots__/multipartFetchExchange.test.ts.snap b/exchanges/multipart-fetch/src/__snapshots__/multipartFetchExchange.test.ts.snap index cff56c16e0..5c52fb12f2 100644 --- a/exchanges/multipart-fetch/src/__snapshots__/multipartFetchExchange.test.ts.snap +++ b/exchanges/multipart-fetch/src/__snapshots__/multipartFetchExchange.test.ts.snap @@ -21,34 +21,27 @@ Object { Object { "directives": Array [], "kind": "OperationDefinition", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "getUser", }, "operation": "query", "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [ Object { "kind": "Argument", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, "value": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -56,25 +49,20 @@ Object { ], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "user", }, "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "id", }, "selectionSet": undefined, @@ -84,10 +72,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "firstName", }, "selectionSet": undefined, @@ -97,10 +83,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "lastName", }, "selectionSet": undefined, @@ -115,22 +99,17 @@ Object { "defaultValue": undefined, "directives": Array [], "kind": "VariableDefinition", - "loc": undefined, "type": Object { "kind": "NamedType", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "String", }, }, "variable": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -191,34 +170,27 @@ Object { Object { "directives": Array [], "kind": "OperationDefinition", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "getUser", }, "operation": "query", "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [ Object { "kind": "Argument", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, "value": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -226,25 +198,20 @@ Object { ], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "user", }, "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "id", }, "selectionSet": undefined, @@ -254,10 +221,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "firstName", }, "selectionSet": undefined, @@ -267,10 +232,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "lastName", }, "selectionSet": undefined, @@ -285,22 +248,17 @@ Object { "defaultValue": undefined, "directives": Array [], "kind": "VariableDefinition", - "loc": undefined, "type": Object { "kind": "NamedType", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "String", }, }, "variable": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -364,34 +322,27 @@ Object { Object { "directives": Array [], "kind": "OperationDefinition", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "getUser", }, "operation": "query", "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [ Object { "kind": "Argument", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, "value": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -399,25 +350,20 @@ Object { ], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "user", }, "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "id", }, "selectionSet": undefined, @@ -427,10 +373,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "firstName", }, "selectionSet": undefined, @@ -440,10 +384,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "lastName", }, "selectionSet": undefined, @@ -458,22 +400,17 @@ Object { "defaultValue": undefined, "directives": Array [], "kind": "VariableDefinition", - "loc": undefined, "type": Object { "kind": "NamedType", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "String", }, }, "variable": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -503,7 +440,7 @@ query getUser($name: String) { user(name: $name) { id firstName lastName } }", } `; -exports[`on success returns response data 2`] = `"{\\"query\\":\\"query getUser($name: String) {\\\\n user(name: $name) {\\\\n id\\\\n firstName\\\\n lastName\\\\n }\\\\n}\\\\n\\",\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"}}"`; +exports[`on success returns response data 2`] = `"{\\"query\\":\\"query getUser($name: String) {\\\\n user(name: $name) {\\\\n id\\\\n firstName\\\\n lastName\\\\n }\\\\n}\\",\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"}}"`; exports[`on success uses a file when given 1`] = ` Object { @@ -539,34 +476,27 @@ Object { Object { "directives": Array [], "kind": "OperationDefinition", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "uploadProfilePicture", }, "operation": "mutation", "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [ Object { "kind": "Argument", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "picture", }, "value": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "picture", }, }, @@ -574,25 +504,20 @@ Object { ], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "uploadProfilePicture", }, "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "location", }, "selectionSet": undefined, @@ -607,22 +532,17 @@ Object { "defaultValue": undefined, "directives": Array [], "kind": "VariableDefinition", - "loc": undefined, "type": Object { "kind": "NamedType", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "File", }, }, "variable": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "picture", }, }, @@ -690,34 +610,27 @@ Object { Object { "directives": Array [], "kind": "OperationDefinition", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "uploadProfilePictures", }, "operation": "mutation", "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [ Object { "kind": "Argument", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "pictures", }, "value": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "pictures", }, }, @@ -725,25 +638,20 @@ Object { ], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "uploadProfilePicture", }, "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "location", }, "selectionSet": undefined, @@ -758,26 +666,20 @@ Object { "defaultValue": undefined, "directives": Array [], "kind": "VariableDefinition", - "loc": undefined, "type": Object { "kind": "ListType", - "loc": undefined, "type": Object { "kind": "NamedType", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "File", }, }, }, "variable": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "pictures", }, }, diff --git a/exchanges/persisted-fetch/src/__snapshots__/persistedFetchExchange.test.ts.snap b/exchanges/persisted-fetch/src/__snapshots__/persistedFetchExchange.test.ts.snap index 9a95db1ac9..17a512b3c0 100644 --- a/exchanges/persisted-fetch/src/__snapshots__/persistedFetchExchange.test.ts.snap +++ b/exchanges/persisted-fetch/src/__snapshots__/persistedFetchExchange.test.ts.snap @@ -1,9 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`accepts successful persisted query responses 1`] = `"{\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"},\\"extensions\\":{\\"persistedQuery\\":{\\"version\\":1,\\"sha256Hash\\":\\"bfa84414672fe625d36f2d2a52e1d3c1e71c5a01e79599c320db7656d6f014d4\\"}}}"`; +exports[`accepts successful persisted query responses 1`] = `"{\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"},\\"extensions\\":{\\"persistedQuery\\":{\\"version\\":1,\\"sha256Hash\\":\\"b4228e10e04c59def248546d305b710309c1b297423b38eb64f989a89a398cd8\\"}}}"`; -exports[`supports cache-miss persisted query errors 1`] = `"{\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"},\\"extensions\\":{\\"persistedQuery\\":{\\"version\\":1,\\"sha256Hash\\":\\"bfa84414672fe625d36f2d2a52e1d3c1e71c5a01e79599c320db7656d6f014d4\\"}}}"`; +exports[`supports cache-miss persisted query errors 1`] = `"{\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"},\\"extensions\\":{\\"persistedQuery\\":{\\"version\\":1,\\"sha256Hash\\":\\"b4228e10e04c59def248546d305b710309c1b297423b38eb64f989a89a398cd8\\"}}}"`; -exports[`supports cache-miss persisted query errors 2`] = `"{\\"query\\":\\"query getUser($name: String) {\\\\n user(name: $name) {\\\\n id\\\\n firstName\\\\n lastName\\\\n }\\\\n}\\\\n\\",\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"},\\"extensions\\":{\\"persistedQuery\\":{\\"version\\":1,\\"sha256Hash\\":\\"bfa84414672fe625d36f2d2a52e1d3c1e71c5a01e79599c320db7656d6f014d4\\"}}}"`; +exports[`supports cache-miss persisted query errors 2`] = `"{\\"query\\":\\"query getUser($name: String) {\\\\n user(name: $name) {\\\\n id\\\\n firstName\\\\n lastName\\\\n }\\\\n}\\",\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"},\\"extensions\\":{\\"persistedQuery\\":{\\"version\\":1,\\"sha256Hash\\":\\"b4228e10e04c59def248546d305b710309c1b297423b38eb64f989a89a398cd8\\"}}}"`; -exports[`supports unsupported persisted query errors 1`] = `"{\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"},\\"extensions\\":{\\"persistedQuery\\":{\\"version\\":1,\\"sha256Hash\\":\\"bfa84414672fe625d36f2d2a52e1d3c1e71c5a01e79599c320db7656d6f014d4\\"}}}"`; +exports[`supports unsupported persisted query errors 1`] = `"{\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"},\\"extensions\\":{\\"persistedQuery\\":{\\"version\\":1,\\"sha256Hash\\":\\"b4228e10e04c59def248546d305b710309c1b297423b38eb64f989a89a398cd8\\"}}}"`; diff --git a/packages/core/src/exchanges/__snapshots__/fetch.test.ts.snap b/packages/core/src/exchanges/__snapshots__/fetch.test.ts.snap index 897dca04b5..f891b3a816 100644 --- a/packages/core/src/exchanges/__snapshots__/fetch.test.ts.snap +++ b/packages/core/src/exchanges/__snapshots__/fetch.test.ts.snap @@ -21,34 +21,27 @@ Object { Object { "directives": Array [], "kind": "OperationDefinition", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "getUser", }, "operation": "query", "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [ Object { "kind": "Argument", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, "value": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -56,25 +49,20 @@ Object { ], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "user", }, "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "id", }, "selectionSet": undefined, @@ -84,10 +72,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "firstName", }, "selectionSet": undefined, @@ -97,10 +83,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "lastName", }, "selectionSet": undefined, @@ -115,22 +99,17 @@ Object { "defaultValue": undefined, "directives": Array [], "kind": "VariableDefinition", - "loc": undefined, "type": Object { "kind": "NamedType", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "String", }, }, "variable": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -191,34 +170,27 @@ Object { Object { "directives": Array [], "kind": "OperationDefinition", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "getUser", }, "operation": "query", "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [ Object { "kind": "Argument", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, "value": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -226,25 +198,20 @@ Object { ], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "user", }, "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "id", }, "selectionSet": undefined, @@ -254,10 +221,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "firstName", }, "selectionSet": undefined, @@ -267,10 +232,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "lastName", }, "selectionSet": undefined, @@ -285,22 +248,17 @@ Object { "defaultValue": undefined, "directives": Array [], "kind": "VariableDefinition", - "loc": undefined, "type": Object { "kind": "NamedType", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "String", }, }, "variable": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -364,34 +322,27 @@ Object { Object { "directives": Array [], "kind": "OperationDefinition", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "getUser", }, "operation": "query", "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [ Object { "kind": "Argument", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, "value": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -399,25 +350,20 @@ Object { ], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "user", }, "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "id", }, "selectionSet": undefined, @@ -427,10 +373,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "firstName", }, "selectionSet": undefined, @@ -440,10 +384,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "lastName", }, "selectionSet": undefined, @@ -458,22 +400,17 @@ Object { "defaultValue": undefined, "directives": Array [], "kind": "VariableDefinition", - "loc": undefined, "type": Object { "kind": "NamedType", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "String", }, }, "variable": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -503,4 +440,4 @@ query getUser($name: String) { user(name: $name) { id firstName lastName } }", } `; -exports[`on success returns response data 2`] = `"{\\"query\\":\\"query getUser($name: String) {\\\\n user(name: $name) {\\\\n id\\\\n firstName\\\\n lastName\\\\n }\\\\n}\\\\n\\",\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"}}"`; +exports[`on success returns response data 2`] = `"{\\"query\\":\\"query getUser($name: String) {\\\\n user(name: $name) {\\\\n id\\\\n firstName\\\\n lastName\\\\n }\\\\n}\\",\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"}}"`; diff --git a/packages/core/src/exchanges/__snapshots__/subscription.test.ts.snap b/packages/core/src/exchanges/__snapshots__/subscription.test.ts.snap index b40072fbf2..74f857bda8 100644 --- a/packages/core/src/exchanges/__snapshots__/subscription.test.ts.snap +++ b/packages/core/src/exchanges/__snapshots__/subscription.test.ts.snap @@ -22,34 +22,27 @@ Object { Object { "directives": Array [], "kind": "OperationDefinition", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "subscribeToUser", }, "operation": "subscription", "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [ Object { "kind": "Argument", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "user", }, "value": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "user", }, }, @@ -57,25 +50,20 @@ Object { ], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "user", }, "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, "selectionSet": undefined, @@ -90,22 +78,17 @@ Object { "defaultValue": undefined, "directives": Array [], "kind": "VariableDefinition", - "loc": undefined, "type": Object { "kind": "NamedType", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "String", }, }, "variable": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "user", }, }, diff --git a/packages/core/src/gql.test.ts b/packages/core/src/gql.test.ts index e57902044f..1081552fc6 100644 --- a/packages/core/src/gql.test.ts +++ b/packages/core/src/gql.test.ts @@ -97,8 +97,7 @@ it('interpolates nested GraphQL Documents', () => { fragment Query on Query { field - } - " + }" `); }); @@ -114,7 +113,6 @@ it('interpolates strings', () => { ).toMatchInlineSnapshot(` "{ field - } - " + }" `); }); diff --git a/packages/core/src/internal/__snapshots__/fetchSource.test.ts.snap b/packages/core/src/internal/__snapshots__/fetchSource.test.ts.snap index 17f56d6a56..2620471a00 100644 --- a/packages/core/src/internal/__snapshots__/fetchSource.test.ts.snap +++ b/packages/core/src/internal/__snapshots__/fetchSource.test.ts.snap @@ -21,34 +21,27 @@ Object { Object { "directives": Array [], "kind": "OperationDefinition", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "getUser", }, "operation": "query", "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [ Object { "kind": "Argument", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, "value": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -56,25 +49,20 @@ Object { ], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "user", }, "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "id", }, "selectionSet": undefined, @@ -84,10 +72,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "firstName", }, "selectionSet": undefined, @@ -97,10 +83,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "lastName", }, "selectionSet": undefined, @@ -115,22 +99,17 @@ Object { "defaultValue": undefined, "directives": Array [], "kind": "VariableDefinition", - "loc": undefined, "type": Object { "kind": "NamedType", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "String", }, }, "variable": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -181,34 +160,27 @@ Object { Object { "directives": Array [], "kind": "OperationDefinition", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "getUser", }, "operation": "query", "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [ Object { "kind": "Argument", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, "value": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -216,25 +188,20 @@ Object { ], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "user", }, "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "id", }, "selectionSet": undefined, @@ -244,10 +211,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "firstName", }, "selectionSet": undefined, @@ -257,10 +222,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "lastName", }, "selectionSet": undefined, @@ -275,22 +238,17 @@ Object { "defaultValue": undefined, "directives": Array [], "kind": "VariableDefinition", - "loc": undefined, "type": Object { "kind": "NamedType", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "String", }, }, "variable": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -341,34 +299,27 @@ Object { Object { "directives": Array [], "kind": "OperationDefinition", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "getUser", }, "operation": "query", "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [ Object { "kind": "Argument", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, "value": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -376,25 +327,20 @@ Object { ], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "user", }, "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "id", }, "selectionSet": undefined, @@ -404,10 +350,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "firstName", }, "selectionSet": undefined, @@ -417,10 +361,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "lastName", }, "selectionSet": undefined, @@ -435,22 +377,17 @@ Object { "defaultValue": undefined, "directives": Array [], "kind": "VariableDefinition", - "loc": undefined, "type": Object { "kind": "NamedType", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "String", }, }, "variable": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -506,34 +443,27 @@ Object { Object { "directives": Array [], "kind": "OperationDefinition", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "getUser", }, "operation": "query", "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [ Object { "kind": "Argument", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, "value": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -541,25 +471,20 @@ Object { ], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "user", }, "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "id", }, "selectionSet": undefined, @@ -569,10 +494,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "firstName", }, "selectionSet": undefined, @@ -582,10 +505,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "lastName", }, "selectionSet": undefined, @@ -600,22 +521,17 @@ Object { "defaultValue": undefined, "directives": Array [], "kind": "VariableDefinition", - "loc": undefined, "type": Object { "kind": "NamedType", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "String", }, }, "variable": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -687,34 +603,27 @@ Object { Object { "directives": Array [], "kind": "OperationDefinition", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "getUser", }, "operation": "query", "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [ Object { "kind": "Argument", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, "value": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, @@ -722,25 +631,20 @@ Object { ], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "user", }, "selectionSet": Object { "kind": "SelectionSet", - "loc": undefined, "selections": Array [ Object { "alias": undefined, "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "id", }, "selectionSet": undefined, @@ -750,10 +654,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "firstName", }, "selectionSet": undefined, @@ -763,10 +665,8 @@ Object { "arguments": Array [], "directives": Array [], "kind": "Field", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "lastName", }, "selectionSet": undefined, @@ -781,22 +681,17 @@ Object { "defaultValue": undefined, "directives": Array [], "kind": "VariableDefinition", - "loc": undefined, "type": Object { "kind": "NamedType", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "String", }, }, "variable": Object { "kind": "Variable", - "loc": undefined, "name": Object { "kind": "Name", - "loc": undefined, "value": "name", }, }, diff --git a/packages/core/src/utils/typenames.test.ts b/packages/core/src/utils/typenames.test.ts index 6e6c9a4400..fb1a62646c 100755 --- a/packages/core/src/utils/typenames.test.ts +++ b/packages/core/src/utils/typenames.test.ts @@ -71,8 +71,7 @@ describe('formatTypeNames', () => { id __typename } - } - " + }" `); }); @@ -85,14 +84,13 @@ describe('formatTypeNames', () => { } }`) ).toMatchInlineSnapshot(` - "{ - todos { - id - __typename - } - } - " - `); + "{ + todos { + id + __typename + } + }" + `); }); it('does add typenames when it is aliased', () => { @@ -104,15 +102,14 @@ describe('formatTypeNames', () => { } }`) ).toMatchInlineSnapshot(` - "{ - todos { - id - typename: __typename - __typename - } - } - " - `); + "{ + todos { + id + typename: __typename + __typename + } + }" + `); }); }); From 1497059ac7fed4d1458492d44f3c9fd0f66d7862 Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Tue, 7 Dec 2021 23:25:45 +0000 Subject: [PATCH 6/7] Add upgrade notice to patch notes --- .changeset/silver-ads-fry.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.changeset/silver-ads-fry.md b/.changeset/silver-ads-fry.md index 4058bebec2..abfc61b396 100644 --- a/.changeset/silver-ads-fry.md +++ b/.changeset/silver-ads-fry.md @@ -18,4 +18,5 @@ '@urql/vue': patch --- -Extend peer dependency range of `graphql` to include `^16.0.0` +Extend peer dependency range of `graphql` to include `^16.0.0`. +As always when upgrading across many packages of `urql`, especially including `@urql/core` we recommend you to deduplicate dependencies after upgrading, using `npm dedupe` or `npx yarn-deduplicate`. From 1c97283ee37c37d20023118681b742dcd6f0bb17 Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Tue, 7 Dec 2021 23:42:06 +0000 Subject: [PATCH 7/7] Fix up additional snapshot and inline test changes --- exchanges/auth/src/authExchange.test.ts | 2 +- .../graphcache/src/offlineExchange.test.ts | 6 ++--- .../src/persistedFetchExchange.test.ts | 7 +++-- .../populate/src/populateExchange.test.ts | 27 +++++++------------ packages/core/src/exchanges/ssr.test.ts | 8 +++++- packages/core/src/utils/request.test.ts | 5 +--- 6 files changed, 23 insertions(+), 32 deletions(-) diff --git a/exchanges/auth/src/authExchange.test.ts b/exchanges/auth/src/authExchange.test.ts index 25d302b48c..3126c853cd 100644 --- a/exchanges/auth/src/authExchange.test.ts +++ b/exchanges/auth/src/authExchange.test.ts @@ -121,7 +121,7 @@ it('supports calls to the mutate() method in getAuth()', async () => { authExchange<{ token: string }>({ getAuth: async ({ mutate }) => { const result = await mutate('mutation { auth }'); - expect(print(result.operation.query)).toBe('mutation {\n auth\n}\n'); + expect(print(result.operation.query)).toBe('mutation {\n auth\n}'); return { token: 'async-token' }; }, willAuthError: () => false, diff --git a/exchanges/graphcache/src/offlineExchange.test.ts b/exchanges/graphcache/src/offlineExchange.test.ts index 01604af0b7..585064cb4b 100644 --- a/exchanges/graphcache/src/offlineExchange.test.ts +++ b/exchanges/graphcache/src/offlineExchange.test.ts @@ -181,8 +181,7 @@ describe('offline', () => { name __typename } -} -`, +}`, variables: {}, }, ]); @@ -311,8 +310,7 @@ describe('offline', () => { name __typename } -} -`, +}`, variables: {}, }, ]); diff --git a/exchanges/persisted-fetch/src/persistedFetchExchange.test.ts b/exchanges/persisted-fetch/src/persistedFetchExchange.test.ts index 2049cc784d..abe4f9bc1d 100644 --- a/exchanges/persisted-fetch/src/persistedFetchExchange.test.ts +++ b/exchanges/persisted-fetch/src/persistedFetchExchange.test.ts @@ -171,7 +171,7 @@ it('correctly generates an SHA256 hash', async () => { const body = JSON.parse(fetch.mock.calls[0][1].body); expect(queryHash).toBe( - 'bfa84414672fe625d36f2d2a52e1d3c1e71c5a01e79599c320db7656d6f014d4' + 'b4228e10e04c59def248546d305b710309c1b297423b38eb64f989a89a398cd8' ); expect(body).toMatchObject({ @@ -223,8 +223,7 @@ it('supports a custom hash function', async () => { firstName lastName } -} -`; +}`; expect(hashFn).toBeCalledWith(queryString, queryOperation.query); }); @@ -259,7 +258,7 @@ it('falls back to a non-persisted query if the hash is falsy', async () => { ' firstName\n' + ' lastName\n' + ' }\n' + - '}\n', + '}', operationName: 'getUser', variables: { name: 'Clara' }, }); diff --git a/exchanges/populate/src/populateExchange.test.ts b/exchanges/populate/src/populateExchange.test.ts index 1d0f013e30..94ce36c7be 100644 --- a/exchanges/populate/src/populateExchange.test.ts +++ b/exchanges/populate/src/populateExchange.test.ts @@ -143,8 +143,7 @@ describe('on mutation', () => { addTodo { __typename } - } - " + }" `); }); }); @@ -216,8 +215,7 @@ describe('on query -> mutation', () => { fragment Todo_PopulateFragment_1 on Todo { text - } - " + }" `); }); }); @@ -303,8 +301,7 @@ describe('on (query w/ fragment) -> mutation', () => { fragment CreatorFragment on User { id name - } - " + }" `); }); @@ -382,8 +379,7 @@ describe('on (query w/ unused fragment) -> mutation', () => { fragment Todo_PopulateFragment_0 on Todo { id text - } - " + }" `); }); @@ -463,8 +459,7 @@ describe('on query -> (mutation w/ interface return type)', () => { fragment Todo_PopulateFragment_0 on Todo { id name - } - " + }" `); }); }); @@ -528,8 +523,7 @@ describe('on query -> (mutation w/ union return type)', () => { fragment Todo_PopulateFragment_0 on Todo { id name - } - " + }" `); }); }); @@ -580,8 +574,7 @@ describe('on query -> teardown -> mutation', () => { addTodo { __typename } - } - " + }" `); }); @@ -654,8 +647,7 @@ describe('interface returned in mutation', () => { id price tax - } - " + }" `); }); }); @@ -732,8 +724,7 @@ describe('nested interfaces', () => { name website } - } - " + }" `); }); }); diff --git a/packages/core/src/exchanges/ssr.test.ts b/packages/core/src/exchanges/ssr.test.ts index a30e47b727..7f188ee182 100644 --- a/packages/core/src/exchanges/ssr.test.ts +++ b/packages/core/src/exchanges/ssr.test.ts @@ -109,7 +109,13 @@ it('caches errored query results correctly', () => { [queryOperation.key]: { data: 'null', error: { - graphQLErrors: ['Oh no!'], + graphQLErrors: [ + { + extensions: {}, + message: 'Oh no!', + path: undefined, + }, + ], networkError: undefined, }, }, diff --git a/packages/core/src/utils/request.test.ts b/packages/core/src/utils/request.test.ts index 3225a5323a..c1041cd426 100644 --- a/packages/core/src/utils/request.test.ts +++ b/packages/core/src/utils/request.test.ts @@ -87,8 +87,5 @@ it('should remove comments', () => { } `; const val = createRequest(doc); - expect(print(val.query)).toBe(`{ - test -} -`); + expect(print(val.query)).toBe(`{\n test\n}`); });