Skip to content

Commit 485fc5b

Browse files
tnineslingclaude
andcommitted
Remove unused field_response_elements function
Dead code with no callers across any stack. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2d06f42 commit 485fc5b

1 file changed

Lines changed: 0 additions & 26 deletions

File tree

  • apollo-federation/src/query_plan/incremental_planner/field_routing

apollo-federation/src/query_plan/incremental_planner/field_routing/commit.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use super::super::fetch_graph::InputRewriteInfo;
1313
use super::super::shared_path::SharedPath;
1414
use super::FieldRoutingSearchSpace;
1515
use crate::error::FederationError;
16-
use crate::operation::Field;
1716
use crate::operation::Selection;
1817
use crate::operation::SelectionSet;
1918
use crate::query_graph::QueryGraphEdgeTransition;
@@ -680,28 +679,3 @@ impl FieldRoutingSearchSpace {
680679
Ok(())
681680
}
682681
}
683-
684-
/// The response path elements a field contributes: its response key, plus
685-
/// an index wildcard per level of list nesting.
686-
pub(super) fn field_response_elements(
687-
field: &Field,
688-
) -> Result<Vec<FetchDataPathElement>, FederationError> {
689-
let mut elements = vec![FetchDataPathElement::Key(
690-
field.response_name().clone(),
691-
Default::default(),
692-
)];
693-
let mut ty = &field.field_position.get(field.schema.schema())?.ty;
694-
loop {
695-
match ty {
696-
apollo_compiler::ast::Type::Named(_) | apollo_compiler::ast::Type::NonNullNamed(_) => {
697-
break;
698-
}
699-
apollo_compiler::ast::Type::List(inner)
700-
| apollo_compiler::ast::Type::NonNullList(inner) => {
701-
elements.push(FetchDataPathElement::AnyIndex(Default::default()));
702-
ty = inner;
703-
}
704-
}
705-
}
706-
Ok(elements)
707-
}

0 commit comments

Comments
 (0)