Context
#183 documents that GRAPHQL_MAX_DEPTH must not be set below 8, because known downstream clients send depth-7 queries and a depth rejection replaces the validation error text they use for schema-tier fallback.
The default is now safe (12), but the documented floor is not enforced: the parser accepts any integer >= 1, so GRAPHQL_MAX_DEPTH=6 is silently honored.
Follow-up work
- Decide whether the floor should be enforced or only warned. The safer behavior is to warn loudly or clamp/reject values below the known-safe floor.
- Add an explicit unit test that the default depth remains above the downstream floor, instead of relying indirectly on the real-query armor test.
- Add a code comment near
maxCost: 5000 explaining that the current safety margin depends on this schema using limit: rather than first: / last:. If future schema work adds first or last pagination arguments, the cost budget must be revisited.
- Mention the transitive
graphql version bump in the PR/release notes because downstream consumers treat graphql-js validation error text as a contract.
Acceptance criteria
Related
Context
#183 documents that
GRAPHQL_MAX_DEPTHmust not be set below8, because known downstream clients send depth-7 queries and a depth rejection replaces the validation error text they use for schema-tier fallback.The default is now safe (
12), but the documented floor is not enforced: the parser accepts any integer>= 1, soGRAPHQL_MAX_DEPTH=6is silently honored.Follow-up work
maxCost: 5000explaining that the current safety margin depends on this schema usinglimit:rather thanfirst:/last:. If future schema work addsfirstorlastpagination arguments, the cost budget must be revisited.graphqlversion bump in the PR/release notes because downstream consumers treat graphql-js validation error text as a contract.Acceptance criteria
GRAPHQL_MAX_DEPTH < 8produces a warning, clamp, or startup validation error with a clear message.first/lastpagination multiplier hazard.Related