hive-router 0.2.0

GraphQL router for Federation, part of the Hive platform
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::query_planner::state::supergraph_state::{OperationKind, SupergraphStateError};
use petgraph::graph::{EdgeIndex, NodeIndex};

#[derive(thiserror::Error, Debug, Clone)]
pub enum GraphError {
    #[error("Node with index '{0:?}' was not found")]
    NodeNotFound(NodeIndex),
    #[error("Edge with index '{0:?}' was not found")]
    EdgeNotFound(EdgeIndex),
    #[error("Unexpected missing root type {0}")]
    MissingRootType(OperationKind),
    #[error("Definition with name '{0}' was not found")]
    DefinitionNotFound(String),
    #[error("Field named '{0}' was not found in definition name '{1}'")]
    FieldDefinitionNotFound(String, String),
    #[error("Supergraph state error: {0}")]
    SupergraphStateError(#[from] SupergraphStateError),
}