diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 183f70f880..bacc8cc9b3 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -26,6 +26,13 @@ By [@USERNAME](https://github.com/USERNAME) in https://github.com/apollographql/ # [x.x.x] (unreleased) - 2022-mm-dd ## ❗ BREAKING ❗ + +### QueryPlan::usage_reporting and QueryPlannerContent are private ([Issue #1556](https://github.com/apollographql/router/issues/1556)) + +These items have been removed from the public API of `apollo_router::services::execution`. + +By [@SimonSapin](https://github.com/SimonSapin) in https://github.com/apollographql/router/pull/1568 + ## 🚀 Features ## 🐛 Fixes ## 🛠 Maintenance diff --git a/apollo-router/src/query_planner/mod.rs b/apollo-router/src/query_planner/mod.rs index dc92d896d9..a0aef7e3f7 100644 --- a/apollo-router/src/query_planner/mod.rs +++ b/apollo-router/src/query_planner/mod.rs @@ -48,7 +48,7 @@ pub(crate) type QueryKey = (String, Option); /// A plan for a given GraphQL query #[derive(Debug)] pub struct QueryPlan { - pub usage_reporting: UsageReporting, + usage_reporting: UsageReporting, pub(crate) root: PlanNode, options: QueryPlanOptions, } diff --git a/apollo-router/src/services/execution.rs b/apollo-router/src/services/execution.rs index b3f8c06707..77f61a30a9 100644 --- a/apollo-router/src/services/execution.rs +++ b/apollo-router/src/services/execution.rs @@ -27,9 +27,8 @@ pub type BoxService = tower::util::BoxService; pub type BoxCloneService = tower::util::BoxCloneService; pub type ServiceResult = Result; -// Reachable from Request or Response: +// Reachable from Request pub use crate::query_planner::QueryPlan; -pub use crate::services::query_planner::QueryPlannerContent; assert_impl_all!(Request: Send); /// [`Context`] and [`QueryPlan`] for the request. diff --git a/apollo-router/src/services/query_planner.rs b/apollo-router/src/services/query_planner.rs index 1fbd743104..6327b8f934 100644 --- a/apollo-router/src/services/query_planner.rs +++ b/apollo-router/src/services/query_planner.rs @@ -42,7 +42,7 @@ pub(crate) struct Response { /// Query, QueryPlan and Introspection data. #[derive(Debug, Clone)] -pub enum QueryPlannerContent { +pub(crate) enum QueryPlannerContent { Plan { query: Arc, plan: Arc, diff --git a/apollo-router/src/spec/query.rs b/apollo-router/src/spec/query.rs index 4377d7031c..08425e4615 100644 --- a/apollo-router/src/spec/query.rs +++ b/apollo-router/src/spec/query.rs @@ -24,7 +24,7 @@ const TYPENAME: &str = "__typename"; /// A GraphQL query. #[derive(Debug, Derivative, Default)] #[derivative(PartialEq, Hash, Eq)] -pub struct Query { +pub(crate) struct Query { string: String, #[derivative(PartialEq = "ignore", Hash = "ignore")] fragments: Fragments,