| Crates.io | hive-router-plan-executor |
| lib.rs | hive-router-plan-executor |
| version | 1.0.4 |
| created_at | 2025-09-01 11:17:27.756678+00 |
| updated_at | 2025-09-09 13:44:43.82996+00 |
| description | GraphQL query planner executor for Federation specification |
| homepage | https://github.com/graphql-hive/router |
| repository | https://github.com/graphql-hive/router |
| max_upload_size | |
| id | 1819441 |
| size | 406,625 |
hive-router-plan-executor)This crate is a standalone library for performing GraphQL execution for a Federation query plan.
Add this to your Cargo.toml:
[dependencies]
hive-router-plan-executor = "<...>"
Start by either producing a plan (using Hive Router query-planner), or by loading it from a file or any other source.
For usage example, please follow the router binary hotpath. The step involved parsing, processing, planning and preparing the incoming operation.
Once all information is collected, you can use it as follows:
use hive_router_plan_executor::execute_query_plan;
use hive_router_plan_executor::execution::plan::QueryPlanExecutionContext;
// Result is a Vec<u8> you can send as final response or make into a Bytes buffer.
let result = execute_query_plan(QueryPlanExecutionContext {
query_plan: query_plan_payload,
projection_plan: &normalized_payload.projection_plan,
variable_values: &variable_payload.variables_map,
extensions,
introspection_context: &introspection_context,
operation_type_name: normalized_payload.root_type_name,
executors: &subgraph_executor_map,
})
.await;