Skip to content

Commit

Permalink
added an extra sanity check where multiple typename conditions are pr…
Browse files Browse the repository at this point in the history
…ovided
  • Loading branch information
duckki committed Jan 29, 2025
1 parent fb9e5d2 commit 294c280
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apollo-federation/src/correctness/query_plan_analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ fn rename_at_path(
rename_at_path(schema, state, type_filter, rest, new_name)
}
FetchDataPathElement::TypenameEquals(type_name) => {
if type_filter.is_some() {
return Err("rename_at_path: multiple type filters".to_string());
}
let type_filter = Some(type_name.clone());
rename_at_path(schema, state, type_filter, rest, new_name)
}
Expand Down

0 comments on commit 294c280

Please sign in to comment.