diff --git a/v3/crates/metadata-resolve/src/stages/object_boolean_expressions/mod.rs b/v3/crates/metadata-resolve/src/stages/object_boolean_expressions/mod.rs index f4ad819f9fb..702169a04b1 100644 --- a/v3/crates/metadata-resolve/src/stages/object_boolean_expressions/mod.rs +++ b/v3/crates/metadata-resolve/src/stages/object_boolean_expressions/mod.rs @@ -11,7 +11,10 @@ use crate::types::subgraph::Qualified; use crate::helpers::type_mappings; use lang_graphql::ast::common as ast; -use open_dds::{data_connector::DataConnectorName, types::CustomTypeName}; +use open_dds::{ + data_connector::DataConnectorName, + types::{CustomTypeName, OperatorName}, +}; use std::collections::{BTreeMap, BTreeSet}; pub use types::{ BooleanExpressionGraphqlConfig, BooleanExpressionInfo, BooleanExpressionsOutput, @@ -318,7 +321,7 @@ pub fn resolve_boolean_expression_info( scalar_type_info.scalar_type.comparison_operators.iter() { operators.insert( - op_name.clone(), + OperatorName(op_name.clone()), resolve_ndc_type( data_connector_name, &get_argument_type(op_definition, &field_mapping.column_type), @@ -341,7 +344,7 @@ pub fn resolve_boolean_expression_info( is_null_operator_name: filter_graphql_config .operator_names .is_null - .to_string(), + .clone(), }, ); }; diff --git a/v3/crates/metadata-resolve/src/stages/object_boolean_expressions/types.rs b/v3/crates/metadata-resolve/src/stages/object_boolean_expressions/types.rs index 4f58185df94..f5bf5ead880 100644 --- a/v3/crates/metadata-resolve/src/stages/object_boolean_expressions/types.rs +++ b/v3/crates/metadata-resolve/src/stages/object_boolean_expressions/types.rs @@ -8,7 +8,7 @@ use std::collections::BTreeSet; use open_dds::{ data_connector::{DataConnectorName, DataConnectorObjectType}, - types::{CustomTypeName, FieldName}, + types::{CustomTypeName, FieldName, OperatorName}, }; use serde::{Deserialize, Serialize}; @@ -44,8 +44,8 @@ pub struct ComparisonExpressionInfo { pub scalar_type_name: String, pub type_name: ast::TypeName, pub ndc_column: String, - pub operators: BTreeMap, - pub is_null_operator_name: String, + pub operators: BTreeMap, + pub is_null_operator_name: ast::Name, } #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] diff --git a/v3/crates/schema/src/boolean_expression.rs b/v3/crates/schema/src/boolean_expression.rs index 13b74926878..f95760d341b 100644 --- a/v3/crates/schema/src/boolean_expression.rs +++ b/v3/crates/schema/src/boolean_expression.rs @@ -263,7 +263,7 @@ fn get_scalar_comparison_input_type( let graphql_type_name = comparison_expression.type_name.clone(); let mut operators = Vec::new(); for (op_name, input_type) in &comparison_expression.operators { - let op_name = mk_name(op_name.as_str())?; + let op_name = mk_name(op_name.0.as_str())?; operators.push((op_name, input_type.clone())) } Ok( @@ -271,7 +271,7 @@ fn get_scalar_comparison_input_type( scalar_type_name: comparison_expression.scalar_type_name.clone(), graphql_type_name, operators, - is_null_operator_name: mk_name(&comparison_expression.is_null_operator_name)?, + is_null_operator_name: comparison_expression.is_null_operator_name.clone(), }), ) }