hasura/graphql-engine · error · OrderableRelationshipError

The orderable relationship '{relationship_name}' defined for

Error message

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

What it means

Thrown when an orderable relationship points at a data connector whose capabilities do not include relationship support, so the relationship cannot be used in ORDER BY. The connector name is included in the message.

Source

Thrown at v3/crates/metadata-resolve/src/stages/order_by_expressions/error.rs:82

        field_name: FieldName,
    },
    #[error("{0}")]
    GraphqlConfigError(#[from] graphql_config::GraphqlConfigError),
    #[error("{message}")]
    UnsupportedFeature { message: String },
}

#[derive(Debug, thiserror::Error)]
#[allow(clippy::enum_variant_names)]
pub enum OrderableRelationshipError {
    #[error(
        "The orderable relationship '{relationship_name}' defined for '{orderable_type}' is a remote relationship and remote relationships are not supported in ordering"
    )]
    RemoteRelationshipsNotSupported {
        orderable_type: Qualified<CustomTypeName>,
        relationship_name: RelationshipName,
    },
    #[error(
        "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"
    )]
    RelationshipsNotSupported {
        orderable_type: Qualified<CustomTypeName>,
        relationship_name: RelationshipName,
        data_connector_name: Qualified<open_dds::data_connector::DataConnectorName>,
    },
    #[error(
        "The orderable relationship '{relationship_name}' defined for '{orderable_type}' is not supported in ordering because the data connector '{data_connector_name}' does not support nested relationships in ordering"
    )]
    NestedRelationshipsNotSupported {
        orderable_type: Qualified<CustomTypeName>,
        relationship_name: RelationshipName,
        data_connector_name: Qualified<open_dds::data_connector::DataConnectorName>,
    },
}

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Check the capabilities of the data connector named in the error and confirm it declares relationship support
  2. If you control the connector, enable/declare relationship capabilities in its capabilities response
  3. Otherwise remove the relationship from the type's orderable relationships
Defensive patterns

Strategy: validation

Validate before calling

const caps = await ndcConnector.capabilities();
if (!caps.relationships) {
  // skip adding orderable relationships for this connector
}

Type guard

const supportsRelationships = (caps) => Boolean(caps?.relationships);

Prevention

When it happens

Trigger: Declaring an orderable relationship whose target type is backed by a data connector that does not advertise relationship support (missing/False relationship capabilities in the connector's capabilities response or config), during the order_by_expressions metadata stage.

Common situations: Using a custom/third-party NDC connector that has not implemented relationship capabilities; toggling off relationships in a connector's capabilities document; version mismatch between connector and metadata expectations.

Related errors


AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28). Data as JSON: /api/errors/74dfcb9264d85f76. Report an issue: GitHub.