graphql: limit query depth and complexity

Depth 3 counts every field including leaves and expands fragments in place, so the Skill.profile cycle cannot be walked twice. Complexity budget 100 with weight 10 on list fields blocks alias floods at validation time.
This commit is contained in:
arswarog committed 2026-11-18 13:06:55 +03:00
1 parent c824a7675b
commit b0da59fbf4
5 files changed
+122 -4

No files matched your search

+19
View File
@@ -3799,6 +3799,17 @@ __metadata:
languageName: node
linkType: hard
"graphql-query-complexity@npm:^2.0.0":
version: 2.0.0
resolution: "graphql-query-complexity@npm:2.0.0"
dependencies:
lodash.get: "npm:^4.4.2"
peerDependencies:
graphql: ^16.6.0 || ^17.0.0
checksum: 10c0/928e8c466a6b58461507be263806fdd652ace0105046f9584ee2a88a6db27e648d05ae4042ebb24e92926fec3052e7cbe32b3a448494d5c0a90b0e3f8b9deb71
languageName: node
linkType: hard
"graphql-tag@npm:2.12.7":
version: 2.12.7
resolution: "graphql-tag@npm:2.12.7"
@@ -4105,6 +4116,7 @@ __metadata:
dataloader: "npm:^2.2.3"
dotenv: "npm:^18.0.10"
graphql: "npm:^17.1.0"
graphql-query-complexity: "npm:^2.0.0"
oxlint: "npm:^1.58.0"
oxlint-tsgolint: "npm:^7.0.2001"
pg: "npm:^8.23.1"
@@ -4301,6 +4313,13 @@ __metadata:
languageName: node
linkType: hard
"lodash.get@npm:^4.4.2":
version: 4.4.2
resolution: "lodash.get@npm:4.4.2"
checksum: 10c0/48f40d471a1654397ed41685495acb31498d5ed696185ac8973daef424a749ca0c7871bf7b665d5c14f5cc479394479e0307e781f61d5573831769593411be6e
languageName: node
linkType: hard
"lodash.omit@npm:4.18.0":
version: 4.18.0
resolution: "lodash.omit@npm:4.18.0"