From e5389b728d0aaab58e13a917df09c91751c17fd8 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Sun, 4 Aug 2024 16:06:47 +0200 Subject: [PATCH 1/2] feat: new protocol --- packages/graphql-yoga/package.json | 2 +- packages/plugins/defer-stream/src/index.ts | 10 +++++ pnpm-lock.yaml | 52 +++++++++++++++++----- 3 files changed, 52 insertions(+), 12 deletions(-) diff --git a/packages/graphql-yoga/package.json b/packages/graphql-yoga/package.json index 9834e81457..fc457f28c0 100644 --- a/packages/graphql-yoga/package.json +++ b/packages/graphql-yoga/package.json @@ -50,7 +50,7 @@ }, "dependencies": { "@envelop/core": "^5.0.1", - "@graphql-tools/executor": "^1.3.0", + "@graphql-tools/executor": "2.0.0-alpha-20240804115623-ba8ea361d8cc77c657068ef6648d977439b63ab3", "@graphql-tools/schema": "^10.0.4", "@graphql-tools/utils": "^10.3.2", "@graphql-yoga/logger": "workspace:^", diff --git a/packages/plugins/defer-stream/src/index.ts b/packages/plugins/defer-stream/src/index.ts index 1a16a1f5fc..5be2465d39 100644 --- a/packages/plugins/defer-stream/src/index.ts +++ b/packages/plugins/defer-stream/src/index.ts @@ -55,5 +55,15 @@ export function useDeferStream< addValidationRule(DeferStreamDirectiveOnRootFieldRule); addValidationRule(StreamDirectiveOnListFieldRule); }, + onExecute({ args }) { + // @ts-expect-error we don't have this typing in envelop + args.deduplicateDefers = false; + // @ts-expect-error we don't have this typing in envelop + args.sendIncrementalErrorsAsNull = true; + // @ts-expect-error we don't have this typing in envelop + args.sendPathAndLabelOnIncremental = true; + // @ts-expect-error we don't have this typing in envelop + args.errorWithIncrementalSubscription = false; + }, }; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e3ae5a2f72..aa6953677e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1566,8 +1566,8 @@ importers: specifier: 5.0.1 version: 5.0.1 '@graphql-tools/executor': - specifier: ^1.3.0 - version: 1.3.0(graphql@16.8.1) + specifier: 2.0.0-alpha-20240804115623-ba8ea361d8cc77c657068ef6648d977439b63ab3 + version: 2.0.0-alpha-20240804115623-ba8ea361d8cc77c657068ef6648d977439b63ab3(graphql@16.8.1) '@graphql-tools/schema': specifier: ^10.0.4 version: 10.0.4(graphql@16.8.1) @@ -4911,6 +4911,12 @@ packages: peerDependencies: graphql: 16.8.1 + '@graphql-tools/executor@2.0.0-alpha-20240804115623-ba8ea361d8cc77c657068ef6648d977439b63ab3': + resolution: {integrity: sha512-9Rs9Ese9lxsf/iYZAzsD43eIMhZEeujfJxDR9YMMaUG1aHwzmOorXuXHgQJtYKEmZpHAqriPdAZLSnXBv/5+MQ==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: 16.8.1 + '@graphql-tools/federation@2.1.0': resolution: {integrity: sha512-vy+Y/9F4IJ4LyPsvJxiKThAgJo2DTSI8ck79x0vmuaxQLFE5qjuVw0LWoo9ygVMgXfiZ/G+hzdfMdpog9eY0rg==} engines: {node: '>=16.0.0'} @@ -5035,6 +5041,12 @@ packages: peerDependencies: graphql: 16.8.1 + '@graphql-tools/utils@10.4.0-alpha-20240804115623-ba8ea361d8cc77c657068ef6648d977439b63ab3': + resolution: {integrity: sha512-AXaMiNwz7dzhGsBMwQUCJxo2mwgFBndu+G+fIBUKd9kOWLMQ2zggoE0atkJSEfeUbWXaWRbmiMM1wu5wuTUZvQ==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: 16.8.1 + '@graphql-tools/utils@8.13.1': resolution: {integrity: sha512-qIh9yYpdUFmctVqovwMdheVNJqFh+DQNWIhX87FJStfXYnmweBUDATok9fWPleKeFwxnW8IapKmY8m8toJEkAw==} peerDependencies: @@ -20449,6 +20461,15 @@ snapshots: tslib: 2.6.3 value-or-promise: 1.0.12 + '@graphql-tools/executor@2.0.0-alpha-20240804115623-ba8ea361d8cc77c657068ef6648d977439b63ab3(graphql@16.8.1)': + dependencies: + '@graphql-tools/utils': 10.4.0-alpha-20240804115623-ba8ea361d8cc77c657068ef6648d977439b63ab3(graphql@16.8.1) + '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.1) + '@repeaterjs/repeater': 3.0.6 + graphql: 16.8.1 + tslib: 2.6.3 + value-or-promise: 1.0.12 + '@graphql-tools/federation@2.1.0(@types/node@20.14.12)(graphql-ws@5.16.0(graphql@16.8.1))(graphql@16.8.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(subscriptions-transport-ws@0.11.0(graphql@16.8.1))': dependencies: '@graphql-tools/delegate': 10.0.16(graphql@16.8.1) @@ -20676,6 +20697,15 @@ snapshots: graphql: 16.8.1 tslib: 2.6.3 + '@graphql-tools/utils@10.4.0-alpha-20240804115623-ba8ea361d8cc77c657068ef6648d977439b63ab3(graphql@16.8.1)': + dependencies: + '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.1) + cross-inspect: 1.0.0 + dlv: 1.1.3 + dset: 3.1.3 + graphql: 16.8.1 + tslib: 2.6.3 + '@graphql-tools/utils@8.13.1(graphql@16.8.1)': dependencies: graphql: 16.8.1 @@ -21566,7 +21596,7 @@ snapshots: find-up: 6.3.0 minimatch: 9.0.5 read-pkg: 7.1.0 - semver: 7.5.4 + semver: 7.6.3 toml: 3.0.0 yaml: 2.5.0 yargs: 17.7.2 @@ -21619,7 +21649,7 @@ snapshots: resolve: 2.0.0-next.5 rfdc: 1.4.1 safe-json-stringify: 1.2.0 - semver: 7.5.4 + semver: 7.6.3 string-width: 5.1.2 strip-ansi: 7.1.0 supports-color: 9.4.0 @@ -21726,7 +21756,7 @@ snapshots: p-wait-for: 4.1.0 path-key: 4.0.0 regexp-tree: 0.1.27 - semver: 7.5.4 + semver: 7.6.3 tmp-promise: 3.0.3 urlpattern-polyfill: 8.0.2 uuid: 9.0.0 @@ -21858,7 +21888,7 @@ snapshots: precinct: 11.0.5(supports-color@9.4.0) require-package-name: 2.0.1 resolve: 2.0.0-next.5 - semver: 7.5.4 + semver: 7.6.3 tmp-promise: 3.0.3 toml: 3.0.0 unixify: 1.0.0 @@ -26050,7 +26080,7 @@ snapshots: js-string-escape: 1.0.1 lodash: 4.17.21 md5-hex: 3.0.1 - semver: 7.5.4 + semver: 7.6.3 well-known-symbols: 2.0.0 concurrently@8.2.2: @@ -28605,7 +28635,7 @@ snapshots: dependencies: '@xhmikosr/downloader': 13.0.1 node-fetch: 3.3.2 - semver: 7.5.4 + semver: 7.6.3 giscus@1.5.0: dependencies: @@ -30229,7 +30259,7 @@ snapshots: jws: 3.2.2 lodash: 4.17.21 ms: 2.1.3 - semver: 7.5.4 + semver: 7.6.3 jsonwebtoken@9.0.2: dependencies: @@ -32339,7 +32369,7 @@ snapshots: is-plain-obj: 4.1.0 normalize-node-version: 12.4.0 path-exists: 5.0.0 - semver: 7.5.4 + semver: 7.6.3 non-layered-tidy-tree-layout@2.0.2: {} @@ -35862,7 +35892,7 @@ snapshots: is-yarn-global: 0.4.1 latest-version: 7.0.0 pupa: 3.1.0 - semver: 7.5.4 + semver: 7.6.3 semver-diff: 4.0.0 xdg-basedir: 5.1.0 From 8c19186989627f9934eee81b558354263e6b7ccc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 4 Aug 2024 14:12:43 +0000 Subject: [PATCH 2/2] chore(dependencies): updated changesets for modified dependencies --- .changeset/graphql-yoga-3402-dependencies.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .changeset/graphql-yoga-3402-dependencies.md diff --git a/.changeset/graphql-yoga-3402-dependencies.md b/.changeset/graphql-yoga-3402-dependencies.md new file mode 100644 index 0000000000..1a83297293 --- /dev/null +++ b/.changeset/graphql-yoga-3402-dependencies.md @@ -0,0 +1,8 @@ +--- +'graphql-yoga': patch +--- +dependencies updates: + - Updated dependency + [`@graphql-tools/executor@2.0.0-alpha-20240804115623-ba8ea361d8cc77c657068ef6648d977439b63ab3` + ↗︎](https://www.npmjs.com/package/@graphql-tools/executor/v/2.0.0) (from `^1.3.0`, in + `dependencies`)