Skip to content

Commit eb02ab6

Browse files
committed
Bump Yoga & GraphQL libs
1 parent 22d13ac commit eb02ab6

File tree

5 files changed

+496
-432
lines changed

5 files changed

+496
-432
lines changed

.yarn/patches/@whatwg-node-fetch-npm-0.9.22-a60314fb39.patch renamed to .yarn/patches/@whatwg-node-fetch-npm-0.10.6-bca79028fb.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/dist/index.d.ts b/dist/index.d.ts
2-
index d16ddf2f4e30e75c5b04044af34e8286b2e8b0a5..9f56feb61efa75a40c815fd56f11642719d41737 100644
2+
index f55c0838ebf3aee24ec547d21ec67dc709ab7c8f..b6606e35b73f3c985f18fe66e924ec2218e35a7b 100644
33
--- a/dist/index.d.ts
44
+++ b/dist/index.d.ts
55
@@ -1,5 +1,3 @@

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"@fastify/cors": "^11.0.1",
4040
"@ffprobe-installer/ffprobe": "^2.1.2",
4141
"@golevelup/nestjs-discovery": "^4.0.0",
42-
"@graphql-hive/yoga": "^0.38.2",
42+
"@graphql-hive/yoga": ">=0.41.0",
4343
"@graphql-tools/utils": "^10.5.4",
4444
"@graphql-yoga/plugin-apq": "^3.7.0",
4545
"@leeoniya/ufuzzy": "^1.0.11",
@@ -78,7 +78,7 @@
7878
"graphql": "^16.9.0",
7979
"graphql-parse-resolve-info": "^4.14.0",
8080
"graphql-scalars": "^1.22.4",
81-
"graphql-yoga": "^5.7.0",
81+
"graphql-yoga": "^5.13.4",
8282
"human-format": "^1.2.0",
8383
"image-size": "^1.0.2",
8484
"indent-string": "^5.0.0",
@@ -115,7 +115,7 @@
115115
},
116116
"devDependencies": {
117117
"@gel/generate": "^0.7.0-canary.20250422T080308",
118-
"@graphql-hive/cli": "^0.44.2",
118+
"@graphql-hive/cli": ">=0.44",
119119
"@nestjs/cli": "^11.0.7",
120120
"@nestjs/schematics": "^11.0.5",
121121
"@nestjs/testing": "^11.1.0",
@@ -157,7 +157,10 @@
157157
"@nestjs/cli/fork-ts-checker-webpack-plugin": "npm:empty-npm-package@*",
158158
"@nestjs/cli/webpack": "npm:empty-npm-package@*",
159159
"@nestjs/cli/typescript": "~5.2.2",
160-
"@whatwg-node/fetch": "patch:@whatwg-node/fetch@npm%3A0.9.22#~/.yarn/patches/@whatwg-node-fetch-npm-0.9.22-a60314fb39.patch",
160+
"@whatwg-node/fetch@npm:^0.10.0": "patch:@whatwg-node/fetch@npm%3A0.10.6#~/.yarn/patches/@whatwg-node-fetch-npm-0.10.6-bca79028fb.patch",
161+
"@whatwg-node/fetch@npm:^0.10.1": "patch:@whatwg-node/fetch@npm%3A0.10.6#~/.yarn/patches/@whatwg-node-fetch-npm-0.10.6-bca79028fb.patch",
162+
"@whatwg-node/fetch@npm:^0.10.4": "patch:@whatwg-node/fetch@npm%3A0.10.6#~/.yarn/patches/@whatwg-node-fetch-npm-0.10.6-bca79028fb.patch",
163+
"@whatwg-node/fetch@npm:^0.10.6": "patch:@whatwg-node/fetch@npm%3A0.10.6#~/.yarn/patches/@whatwg-node-fetch-npm-0.10.6-bca79028fb.patch",
161164
"logform": "2.6.1",
162165
"process-warning": "^5",
163166
"secure-json-parse": "^4",

src/core/exception/exception.normalizer.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,21 @@ export class ExceptionNormalizer {
189189
}
190190

191191
if (ex instanceof GraphQLError) {
192+
if (ex.extensions.code === 'GRAPHQL_VALIDATION_FAILED') {
193+
return { codes: ['Validation', 'GraphQL', 'Client'] };
194+
}
195+
if (ex.extensions.code === 'GRAPHQL_PARSE_FAILED') {
196+
return { codes: ['Parse', 'GraphQL', 'Client'] };
197+
}
198+
if (ex.extensions.code === 'OPERATION_RESOLUTION_FAILURE') {
199+
return { codes: ['OperationResolution', 'GraphQL', 'Client'] };
200+
}
201+
const status = (ex.extensions as any).http?.status ?? 500;
202+
if (status === 413 && ex.message.startsWith('Batching is limited')) {
203+
return { codes: ['BatchLimit', 'GraphQL', 'Client'] };
204+
}
192205
const isClient =
193-
(ex.extensions.http?.status ?? 500) < 500 ||
206+
status < 500 ||
194207
// Guessing here. No execution path - client problem.
195208
!ex.path;
196209
return { codes: ['GraphQL', isClient ? 'Client' : 'Server'] };

src/core/graphql/graphql.options.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,6 @@ export class GraphqlOptions implements GqlOptionsFactory {
8383
this.useAutomaticPersistedQueries(),
8484
this.useAddOperationToContext(),
8585
],
86-
fetchAPI: {
87-
// @whatwg-node/node-fetch polyfill doesn't keep square brackets for ipv6 hostname
88-
// Itself is patching a 10-year-old library to provide the polyfill.
89-
// IDK why it is even poly-filling, URL is available in Node since v10.
90-
URL,
91-
},
9286
};
9387
}
9488

0 commit comments

Comments
 (0)