Skip to content

Commit ae329a4

Browse files
committed
Rust intropsection: disable max depth rule
This protection against introspection queries generating huge responses was added recently in graphql-js graphql/graphql-js#4118 and ported to rust apollographql/apollo-rs#904, but is not yet present in the graphql-js version used by router-bridge. This disables it for now from Rust introspection, in order to match the current state of JS introspection. Adding this rule (in both implementations) can be revisited separately. In particular: the depth limit is hard-coded to 3. Is that the right number? Should it be configurable? Is the rule checking the right set of fields?
1 parent 071b21e commit ae329a4

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

apollo-router/src/query_planner/bridge_query_planner.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -559,12 +559,6 @@ impl BridgeQueryPlanner {
559559
) -> Result<graphql::Response, QueryPlannerError> {
560560
let schema = self.schema.api_schema();
561561
let operation = doc.get_operation(key.operation_name.as_deref())?;
562-
apollo_compiler::execution::check_introspection_max_depth(&doc.executable, operation)
563-
.map_err(|_e| {
564-
QueryPlannerError::Introspection(IntrospectionError {
565-
message: Some("Maximum introspection depth exceeded".to_owned()),
566-
})
567-
})?;
568562
let variable_values = Default::default();
569563
let variable_values =
570564
apollo_compiler::execution::coerce_variable_values(schema, operation, &variable_values)

0 commit comments

Comments
 (0)