{"record":{"id":"e14b1dfb02360787","repo":"hasura/graphql-engine","slug":"message","errorCode":null,"errorMessage":"{message}","messagePattern":"\\{message\\}","errorType":"validation","errorClass":"OrderByExpressionError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/order_by_expressions/error.rs","lineNumber":68,"sourceCode":"    #[error(\n        \"The order by expression {order_by_expression_name} referenced in orderable relationship {relationship_name} has not been defined\"\n    )]\n    UnknownOrderByExpressionNameInOrderableRelationship {\n        order_by_expression_name: OrderByExpressionName,\n        relationship_name: RelationshipName,\n    },\n    #[error(\n        \"The type of the order by expression {order_by_expression_name} referenced in field {field_name} does not match the field type. Order by expression type: {order_by_expression_type}; field type: {field_type}. \"\n    )]\n    OrderableFieldTypeError {\n        order_by_expression_name: OrderByExpressionName,\n        order_by_expression_type: TypeName,\n        field_type: QualifiedBaseType,\n        field_name: FieldName,\n    },\n    #[error(\"{0}\")]\n    GraphqlConfigError(#[from] graphql_config::GraphqlConfigError),\n    #[error(\"{message}\")]\n    UnsupportedFeature { message: String },\n}\n\n#[derive(Debug, thiserror::Error)]\n#[allow(clippy::enum_variant_names)]\npub enum OrderableRelationshipError {\n    #[error(\n        \"The orderable relationship '{relationship_name}' defined for '{orderable_type}' is a remote relationship and remote relationships are not supported in ordering\"\n    )]\n    RemoteRelationshipsNotSupported {\n        orderable_type: Qualified<CustomTypeName>,\n        relationship_name: RelationshipName,\n    },\n    #[error(\n        \"The orderable relationship '{relationship_name}' defined for '{orderable_type}' is not supported in ordering because the data connector '{data_connector_name}' does not support relationships\"\n    )]\n    RelationshipsNotSupported {\n        orderable_type: Qualified<CustomTypeName>,","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/order_by_expressions/error.rs#L50-L86","documentation":"Thrown by the metadata-resolve crate when an order-by expression uses a feature that is not supported by the current metadata/configuration. It is a generic 'UnsupportedFeature' variant in the OrderByExpressionsError enum carrying a free-form message produced during resolution of order_by_expressions metadata.","triggerScenarios":"Declaring an order_by_expressions entry in OpenDD metadata whose expression type or field usage relies on a capability the resolver does not support (e.g. exotic type names or field types the order-by pipeline cannot map); triggered while resolving the order_by_expressions metadata stage.","commonSituations":"Upgrading NDC v3 metadata where new order-by expression syntax is used but the resolver version does not support it; hand-written OpenDD YAML with order-by expressions referencing unsupported scalar/command types.","solutions":["Read the embedded {message} — it states exactly which feature is unsupported","Check the order_by_expressions section of your OpenDD metadata for the offending expression and simplify it (order only on scalar fields without arguments)","Verify the expression type and field types are supported types in your metadata","Upgrade the hasura metadata-resolve v3 crates to a version that supports the feature mentioned in the message"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before applying metadata, lint order_by_expressions entries against supported features\nfor (const expr of metadata.order_by_expressions ?? []) {\n  assertScalarFieldsOnly(expr, supportedTypes);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep metadata tooling/crates and connector versions in sync","Run metadata resolve/validate in CI before applying changes"],"tags":["metadata","order-by","open-dds","validation","rust"],"backgroundTag":"metadata-validation-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}