hasura/graphql-engine · error · ObjectTypesIssue

The field '{field_name}' in object type '{type_name}' cannot

Error message

The field '{field_name}' in object type '{type_name}' cannot be mapped to data connector '{data_connector}' field '{data_connector_object}.{data_connector_column}' because: {issue}

What it means

A field-to-connector-column mapping failed; the inner 'issue' (an ObjectTypesIssue) explains why. This wrapper adds context about which field of which object type was being mapped to which data connector object and column when the failure occurred.

Source

Thrown at v3/crates/metadata-resolve/src/stages/object_types/types.rs:491

        expected: QualifiedTypeName,
        provided: QualifiedTypeName,
    },
    #[error(
        "Field type {field_type} could not be found in field {field_name} for object type {object_type_name}"
    )]
    FieldTypeNotFound {
        field_type: Qualified<CustomTypeName>,
        object_type_name: Qualified<CustomTypeName>,
        field_name: FieldName,
    },
    #[error(
        "Recursive reference detected for object type '{type_name}' through non-null field path: {field_path}"
    )]
    RecursiveObjectType {
        type_name: Qualified<CustomTypeName>,
        field_path: String,
    },
    #[error(
        "The field '{field_name}' in object type '{type_name}' cannot be mapped to data connector '{data_connector}' field '{data_connector_object}.{data_connector_column}' because: {issue}"
    )]
    FieldTypeNdcMappingIssue {
        field_name: FieldName,
        type_name: Qualified<CustomTypeName>,
        data_connector: Qualified<DataConnectorName>,
        data_connector_object: DataConnectorObjectType,
        data_connector_column: DataConnectorColumnName,
        issue: TypeCompatibilityIssue,
    },
}

impl ShouldBeAnError for ObjectTypesIssue {
    fn should_be_an_error(&self, flags: &open_dds::flags::OpenDdFlags) -> bool {
        match self {
            ObjectTypesIssue::DuplicateOperatorsDefined { .. } => flags
                .contains(open_dds::flags::Flag::DisallowDuplicateOperatorDefinitionsForScalarType),
            ObjectTypesIssue::DuplicateAggregateFunctionsDefined { .. } => flags.contains(

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Read the inner issue in the message — it names the concrete failure (type mismatch, unknown column, etc.) and fix that
  2. Refresh the connector schema / re-track the table so column metadata matches the database
  3. Correct or remove the field mapping for the failing field
Defensive patterns

Strategy: try-catch

Validate before calling

// Verify each mapped column exists in the connector object before apply
const obj = ndcSchema.object_types[dcObject];
for (const m of fieldMappings) if (!(m.column in obj.fields)) throw new Error(`Column ${m.column} missing`);

Try / catch

// Inspect the inner issue for actionable detail
try { await applyMetadata(md); }
catch (e) { if (/cannot be mapped to data connector/.test(String(e))) { logInnerIssue(e); } throw e; }

Prevention

When it happens

Trigger: Any NDC mapping problem on a single field — type mismatch on the column, unsupported column type, missing column in the connector object — surfaces through this contextual error.

Common situations: Column dropped or renamed in the database while metadata still maps the field to it; column type unsupported by the connector; type mapping inconsistencies introduced by schema drift.

Related errors


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