hasura/graphql-engine · error · ScalarBooleanExpressionTypeError
cannot find type {custom_type:} when resolving arguments for
Error message
cannot find type {custom_type:} when resolving arguments for comparison operator {operator_name:} for {boolean_expression_type:} What it means
A comparison operator on a boolean expression type declares an argument whose type is a custom type that cannot be found during resolution. The resolver needs the argument's type to build the operator's input schema; a missing Qualified<CustomTypeName> aborts the scalar boolean expressions stage.
Source
Thrown at v3/crates/metadata-resolve/src/stages/scalar_boolean_expressions/error.rs:25
data_connector::{DataConnectorName, DataConnectorScalarType},
types::{CustomTypeName, OperatorName},
};
#[derive(Debug, thiserror::Error)]
pub enum ScalarBooleanExpressionTypeError {
#[error(
"unknown data connector {data_connector:} referenced in scalar type representation of {scalar_type:}"
)]
ScalarTypeFromUnknownDataConnector {
data_connector: Qualified<DataConnectorName>,
scalar_type: DataConnectorScalarType,
},
#[error("cannot find scalar type {scalar_type:} in data connector {data_connector:}")]
UnknownScalarTypeInDataConnector {
data_connector: Qualified<DataConnectorName>,
scalar_type: DataConnectorScalarType,
},
#[error(
"cannot find type {custom_type:} when resolving arguments for comparison operator {operator_name:} for {boolean_expression_type:}"
)]
UnknownCustomTypeInComparisonOperatorArgument {
custom_type: Qualified<CustomTypeName>,
operator_name: OperatorName,
boolean_expression_type: Qualified<CustomTypeName>,
},
#[error("data connector {data_connector:} could not be found")]
DataConnectorNotFound {
data_connector: Qualified<DataConnectorName>,
},
#[error("scalar representations for data connector {data_connector:} could not be found")]
DataConnectorScalarRepresentationsNotFound {
data_connector: Qualified<DataConnectorName>,
},
#[error(
"scalar type representation required for type {scalar_type:} in data connector {data_connector:}"
)]View on GitHub (pinned to 724551b9ae)
Solutions
- Grep metadata for the custom type name from the error and correct the spelling or namespace in the operator's argument definition
- If the type was renamed, update the operator argument to the new name
- If the type is missing entirely, add its definition or use a builtin scalar for the argument
Example fix
# before
operators:
_eq:
argumentType: my_subgraph/Teimstamp # type is 'my_subgraph/Timestamp'
# after
operators:
_eq:
argumentType: my_subgraph/Timestamp Defensive patterns
Strategy: validation
Validate before calling
fn check_operator_arg_types(
types: &BTreeSet<Qualified<CustomTypeName>>,
ops: &[(OperatorName, Qualified<CustomTypeName>)],
) -> Result<(), String> {
for (op, ty) in ops {
if !types.contains(ty) { return Err(format!("operator {op} argument type {ty} undefined")); }
}
Ok(())
} Try / catch
downcast UnknownCustomTypeInComparisonOperatorArgument and report operator name, missing type, and enclosing boolean expression type
Prevention
- Grep for a custom type name before renaming/removing it
- Keep operator definitions and the types they reference in the same subgraph
When it happens
Trigger: An operator in a boolean expression type configuration lists an argument referencing a custom type name that isn't defined in the types subgraph — typo, deleted type, or wrong namespace qualification.
Common situations: Renaming or removing a custom type still used as an operator argument; copy-pasting operator definitions between subgraphs with different type sets; namespace mismatch in the qualified type name.
Related errors
- Source type {object_type_name} referenced in the definition
- unknown data connector {data_connector:} referenced in scala
- the aggregate expression {name} specifies an aggregation fun
- argument {argument_name:?} has an issue: {issue:?}
- unknown type '{type_name}' used in object boolean expression
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/bea8c54aa73e2307.
Report an issue: GitHub.