hasura/graphql-engine · error · TypeMappingValidationError

expected to find a predicate type for argument {argument_nam

Error message

expected to find a predicate type for argument {argument_name:} but did not

What it means

During object type resolution the resolver looked up the predicate (filter) type corresponding to an argument name of a comparison operator and did not find it. Comparison operators declared by the connector must have a predicate type entry; if the argument name has no matching predicate type, resolution fails.

Source

Thrown at v3/crates/metadata-resolve/src/stages/object_types/error.rs:127

        field_name: FieldName,
        unknown_field_type_name: Qualified<CustomTypeName>,
    },
    #[error(
        "could not find mappings for {object_type_name:} to the {data_connector_object_type:} on data connector {data_connector_name:}"
    )]
    DataConnectorTypeMappingNotFound {
        object_type_name: Qualified<CustomTypeName>,
        data_connector_name: Qualified<DataConnectorName>,
        data_connector_object_type: DataConnectorObjectType,
    },
    #[error(
        "the type {unknown_ndc_type:} is not defined as an object type in the connector's schema. This type is being mapped to by the type {type_name:}"
    )]
    UnknownNdcType {
        type_name: Qualified<CustomTypeName>,
        unknown_ndc_type: DataConnectorObjectType,
    },
    #[error("expected to find a predicate type for argument {argument_name:} but did not")]
    PredicateTypeNotFound { argument_name: ArgumentName },
    #[error(
        "the type {unknown_ndc_field_type_name:} is not defined as an object type in the connector's schema. This type is referenced by the field {ndc_field_name:} in the connector's schema type {ndc_type_name:}, which is mapped to the field {field_name:} in the type {type_name:}"
    )]
    UnknownNdcFieldObjectType {
        type_name: Qualified<CustomTypeName>,
        field_name: FieldName,
        ndc_type_name: String,
        ndc_field_name: String,
        unknown_ndc_field_type_name: String,
    },
    #[error("ndc validation error: {0}")]
    NDCValidationError(#[from] NDCValidationError),
}

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Check the comparison operator definitions in metadata and make sure each argument_name has a corresponding predicate type
  2. Ensure the filter/predicate object types generated for the type are present and named consistently with operator arguments
  3. Update the connector to a version whose operator signatures match the metadata
Defensive patterns

Strategy: validation

Validate before calling

// Verify each comparison operator argument has a matching predicate type before apply
for (const op of comparisonOperators) {
  if (!predicateTypeNames.has(op.argument_name)) throw new Error(`Missing predicate type for argument ${op.argument_name}`);
}

Prevention

When it happens

Trigger: A data connector declares comparison operator functions whose argument names do not match any predicate type name, or the generated filter object types for the mapped type are missing/renamed in the metadata while enable_ordering/filtering is on.

Common situations: Custom comparison operators added in metadata with a wrong argument name; connector versions that change operator argument conventions; hand-written predicate types that omit an entry for a new argument.

Related errors


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