-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(federation): started query plan correctness checker
- implemented ResponseShape computation from an operation
- Loading branch information
Showing
5 changed files
with
1,462 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
pub mod response_shape; | ||
#[cfg(test)] | ||
pub mod response_shape_test; | ||
|
||
use apollo_compiler::validation::Valid; | ||
use apollo_compiler::ExecutableDocument; | ||
|
||
use crate::query_plan::QueryPlan; | ||
use crate::schema::ValidFederationSchema; | ||
use crate::FederationError; | ||
|
||
//================================================================================================== | ||
// check_plan | ||
|
||
pub fn check_plan( | ||
schema: &ValidFederationSchema, | ||
operation_doc: &Valid<ExecutableDocument>, | ||
_plan: &QueryPlan, | ||
) -> Result<(), FederationError> { | ||
let rs = response_shape::compute_response_shape(operation_doc, schema)?; | ||
println!("\nResponse shape from operation:\n{rs}"); | ||
Ok(()) | ||
} |
Oops, something went wrong.