hasura/graphql-engine · error · ModelsIssue
Issue in order by expression '{order_by_expression_identifie
Error message
Issue in order by expression '{order_by_expression_identifier}' used by model '{model_name}': {error} What it means
A generic wrapper: the order by expression referenced by a model produced an OrderableRelationshipError, whose detail is appended as {error}.
Source
Thrown at v3/crates/metadata-resolve/src/stages/models/types.rs:133
},
#[error(
"The orderable field '{field_name}' in model '{model_name}' is an array type (type: {field_type}) and therefore cannot be used for ordering"
)]
ModelV1OrderableFieldIsAnArrayType {
model_name: Qualified<ModelName>,
field_name: FieldName,
field_type: QualifiedTypeReference,
},
#[error(
"The order by expression '{order_by_expression_identifier}' used in model '{model_name}' contains a nested field '{nested_field_name}', however the data connector '{data_connector_name}' used in the model does not support ordering by nested fields"
)]
OrderByExpressionContainsUnsupportedNestedField {
order_by_expression_identifier: Qualified<OrderByExpressionIdentifier>,
model_name: Qualified<ModelName>,
nested_field_name: FieldName,
data_connector_name: Qualified<DataConnectorName>,
},
#[error(
"Issue in order by expression '{order_by_expression_identifier}' used by model '{model_name}': {error}"
)]
OrderableRelationshipError {
order_by_expression_identifier: Qualified<OrderByExpressionIdentifier>,
model_name: Qualified<ModelName>,
error: order_by_expressions::OrderableRelationshipError,
},
#[error(
"The target model '{target_model_name}' of the orderable relationship '{relationship_name}' in order by expression '{order_by_expression_identifier}' used in model '{model_name}' must have a source"
)]
OrderableRelationshipTargetModelMustHaveASource {
order_by_expression_identifier: Qualified<OrderByExpressionIdentifier>,
model_name: Qualified<ModelName>,
relationship_name: open_dds::relationships::RelationshipName,
target_model_name: Qualified<ModelName>,
},
#[error(
"The target command '{target_command_name}' of the orderable relationship '{relationship_name}' in order by expression '{order_by_expression_identifier}' used in model '{model_name}' must have a source"View on GitHub (pinned to 724551b9ae)
Solutions
- Read the appended {error} detail and fix the underlying OrderableRelationshipError
- Verify the target of the relationship is a valid sourced model/command
Defensive patterns
Strategy: try-catch
Try / catch
catch (e) { if (/Issue in order by expression/.test(e.message)) surfaceOrderableRelationshipDetail(e.message); } Prevention
- Validate relationship targets before writing order_by_expressions over them
When it happens
Trigger: Any error while resolving an order_by_expression that traverses a relationship (e.g. missing source on the target, unsupported relationship type).
Common situations: Adding order_by_expressions across relationships where the target model or command isn't properly sourced.
Related errors
- The target model '{target_model_name}' of the orderable rela
- The order by expression '{order_by_expression_identifier}' u
- The target command '{target_command_name}' of the orderable
- the relationship '{relationship_name}' is defined more than
- the comparable relationship '{relationship_name}' for the op
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/f55e88850b1a0396.
Report an issue: GitHub.