pub fn check_max_depth(
document: &Valid<ExecutableDocument>,
operation: &Operation,
) -> Result<(), RequestError>
Expand description
Check that the nesting level of some list fields does not exceed a fixed depth limit.
Since the schema-introspection schema is recursive, a malicious query could cause huge responses that grow exponentially to the nesting depth.
An error result is a request error:
execution must not run at all,
and the GraphQL response must not have a data
key (which is different from data: null
).
The exact criteria may change in future apollo-compiler versions.