hasura/graphql-engine · error · RelationshipError

The target data connector {data_connector_name} for relation

Error message

The target data connector {data_connector_name} for relationship {relationship_name} on type {type_name} has not defined any capabilities

What it means

The data connector used by the relationship target reported no capabilities at all, so the resolver cannot even determine whether variables/foreach is supported. This usually means the connector metadata or capability advertisement is missing or malformed.

Source

Thrown at v3/crates/metadata-resolve/src/stages/object_relationships/error.rs:119

        type_name: Qualified<CustomTypeName>,
    },
    #[error(
        "No mapping for target command argument {argument_name} in the relationship {relationship_name} on type {type_name}"
    )]
    MissingArgumentMappingInRelationship {
        type_name: Qualified<CustomTypeName>,
        argument_name: ArgumentName,
        relationship_name: RelationshipName,
    },
    #[error(
        "The target data connector {data_connector_name} for relationship {relationship_name} on type {type_name} does not support the variables capability"
    )]
    RelationshipTargetDoesNotSupportForEach {
        type_name: Qualified<CustomTypeName>,
        relationship_name: RelationshipName,
        data_connector_name: Qualified<DataConnectorName>,
    },
    #[error(
        "The target data connector {data_connector_name} for relationship {relationship_name} on type {type_name} has not defined any capabilities"
    )]
    NoRelationshipCapabilitiesDefined {
        type_name: Qualified<CustomTypeName>,
        relationship_name: RelationshipName,
        data_connector_name: Qualified<DataConnectorName>,
    },
    #[error(
        "The relationship {relationship_name} on type {type_name} defines an aggregate, but aggregates can only be used with array relationships, not object relationships"
    )]
    AggregateIsOnlyAllowedOnArrayRelationships {
        type_name: Qualified<CustomTypeName>,
        relationship_name: RelationshipName,
    },
    #[error(
        "The aggregate defined on the relationship {relationship_name} on type {type_name} has an error: {error}"
    )]
    ModelAggregateExpressionError {

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Ensure the data connector's metadata includes a valid capabilities block
  2. Re-register or refresh the data connector so its capabilities are captured
  3. If capabilities are genuinely unknown, avoid variable/foreach mappings on that connector until it advertises capabilities

Example fix

// before
data_connectors:
  my_connector:
    url: http://...
    # no capabilities
// after
data_connectors:
  my_connector:
    url: http://...
    capabilities:
      variables: {}
      ...
Defensive patterns

Strategy: validation

Validate before calling

const caps = connectors[connectorName].capabilities;
if (!caps || Object.keys(caps).length === 0) {
  throw new Error(`connector ${connectorName} defines no capabilities`);
}

Try / catch

try { await applyMetadata(md); } catch (e) { if (/has not defined any capabilities/.test(e.message)) { /* fix connector registration */ } throw e; }

Prevention

When it happens

Trigger: A relationship target whose data connector has an empty/absent capabilities definition in the resolved metadata.

Common situations: Custom connector registered without a capabilities schema; malformed connector metadata; version mismatch where an older metadata format omitted capabilities.

Related errors


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