Skip to main content

hive_router_query_planner/ast/normalization/
error.rs

1#[derive(Debug, thiserror::Error)]
2pub enum NormalizationError {
3    #[error("Expected a transformed operation, but found none.")]
4    ExpectedTransformedOperationNotFound,
5
6    #[error("Multiple operations found matching the criteria.")]
7    MultipleMatchingOperationsFound,
8
9    #[error("Specified operation '{operation_name}' not found.")]
10    SpecifiedOperationNotFound { operation_name: String },
11
12    #[error("An operation was expected, but none were present.")]
13    OperationNotFound,
14
15    #[error("Type for operation kind '{kind}' not found.")]
16    TypeForOperationNotFound { kind: String },
17
18    #[error("Schema type '{type_name}' not found.")]
19    SchemaTypeNotFound { type_name: String },
20
21    #[error("Field '{field_name}' not found in type '{type_name}'.")]
22    FieldNotFoundInType {
23        field_name: String,
24        type_name: String,
25    },
26
27    #[error("Possible types for '{type_name}' not found.")]
28    PossibleTypesNotFound { type_name: String },
29
30    #[error("Fragment definition for '{fragment_name}' not found.")]
31    FragmentDefinitionNotFound { fragment_name: String },
32
33    #[error("Cyclic fragment spread detected for '{fragment_name}'.")]
34    CyclicFragmentSpread { fragment_name: String },
35}