hasura/graphql-engine · error · Error
{type_error:}
Error message
{type_error:} What it means
Transparent wrapper variant of metadata-resolve's resolve Error enum: it delegates the display message to the inner TypeError produced during metadata type-checking. The message you see ('{type_error:}') is the rendered TypeError, which reports a mismatch between a field/argument/relationship type declared in NDC metadata or the type system (e.g. an unsupported scalar type, an invalid comparison operator target, or inconsistent nullability).
Source
Thrown at v3/crates/metadata-resolve/src/types/error.rs:252
#[error("{0}")]
BooleanExpressionError(#[from] boolean_expressions::BooleanExpressionError),
#[error("{0}")]
ScalarBooleanExpressionTypeError(
#[from] scalar_boolean_expressions::ScalarBooleanExpressionTypeError,
),
#[error("{0}")]
AggregateBooleanExpressionError(
#[from] aggregate_boolean_expressions::NamedAggregateBooleanExpressionError,
),
#[error("{0}")]
TypePredicateError(#[from] TypePredicateError),
#[error("{0}")]
DataConnectorError(#[from] data_connectors::NamedDataConnectorError),
#[error("NDC validation error: {0}")]
NDCValidationError(#[from] NDCValidationError),
#[error("{0}")]
ScalarTypesError(#[from] scalar_types::ScalarTypesError),
#[error("{type_error:}")]
TypeError { type_error: TypeError },
#[error("{0}")]
AggregateExpressionError(AggregateExpressionError),
#[error("{0}")]
TypePermissionError(type_permissions::TypePermissionError),
#[error("{0}")]
ObjectTypesError(#[from] object_types::ObjectTypesError),
#[error("{0}")]
ApolloError(#[from] apollo::ApolloError),
#[error("{0}")]
RelayError(#[from] relay::RelayError),
#[error("{0}")]
ModelsError(#[from] models::ModelsError),
#[error("{0}")]
CommandsError(#[from] commands::CommandsError),
#[error("{0}")]
RelationshipError(#[from] relationships::RelationshipError),
#[error("{0}")]View on GitHub (pinned to 724551b9ae)
Solutions
- Read the inner TypeError text (it names the type and location) and fix the referenced type in the metadata file
- Verify every scalar type referenced by fields/arguments is declared under scalar.types
- Re-run metadata validation after each fix; multiple type errors may surface one at a time
Example fix
// before
{"fields": {"id": {"type": "string!"}}} // 'string!' not declared
// after
{"fields": {"id": {"type": "ID"}}} // or declare the scalar under scalar.types Defensive patterns
Strategy: try-catch
Type guard
fn is_type_error(e: &metadata_resolve::Error) -> bool { matches!(e, metadata_resolve::Error::TypeError { .. }) } Try / catch
match result {
Err(Error::TypeError { type_error }) => {/* report type_error with context */},
Err(e) => return Err(e),
Ok(v) => v,
} Prevention
- Run metadata validation (CLI or /v1/metadata endpoint) before applying
- Declare all scalar types referenced by fields and arguments
- Automate metadata linting in CI
When it happens
Trigger: Calling metadata resolve/validate APIs (e.g. resolve_metadata) where a model field, command argument, or expression references a type that fails type checking: unknown type names, comparing incompatible scalar types, or expression aggregate/type mismatches.
Common situations: Editing NDC metadata or Hasura metadata by hand where a field references a scalar type that is not defined, or a relationship/comparison uses mismatched types; upgrading hasura/ndc-hub connectors whose type mappings changed.
Related errors
- Condition {condition_hash} not found
- could not find a scalar-operanded boolean expression type na
- the type of the comparable field '{field_name}' ({field_type
- the boolean expression type ({boolean_expression_type}) used
- the boolean expression type ({boolean_expression_type}) used
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/b9929f4f3283bd99.
Report an issue: GitHub.