hasura/graphql-engine · error · ObjectTypesIssue

Multiple {operator_name} operators found for type {scalar_ty

Error message

Multiple {operator_name} operators found for type {scalar_type} in data connector {data_connector_name}

What it means

The connector's schema (or generated operator collections) declares more than one comparison operator with the same operator_name for the same scalar type. The resolver requires operator names to be unique per (scalar type, data connector) so it can pick a deterministic operator.

Source

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

    pub day_of_week_function: Option<DataConnectorExtractionFunctionName>,
    pub day_of_year_function: Option<DataConnectorExtractionFunctionName>,
    pub other_functions: Vec<DataConnectorExtractionFunctionName>,
}

/// Mapping from an object to their fields, which contain types.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
pub enum TypeMapping {
    /// Mapping from an object to their fields, which contain the types of fields.
    Object {
        ndc_object_type_name: DataConnectorObjectType,
        field_mappings: Arc<BTreeMap<FieldName, FieldMapping>>,
    },
}

#[allow(clippy::enum_variant_names)]
#[derive(Debug, thiserror::Error)]
pub enum ObjectTypesIssue {
    #[error(
        "Multiple {operator_name} operators found for type {scalar_type} in data connector {data_connector_name}"
    )]
    DuplicateOperatorsDefined {
        scalar_type: ndc_models::ScalarTypeName,
        operator_name: String,
        data_connector_name: Qualified<DataConnectorName>,
    },
    #[error(
        "Multiple {function_name} aggregate functions found for type {scalar_type} in data connector {data_connector_name}"
    )]
    DuplicateAggregateFunctionsDefined {
        scalar_type: ndc_models::ScalarTypeName,
        function_name: String,
        data_connector_name: Qualified<DataConnectorName>,
    },
    #[error(
        "Multiple {function_name} extraction functions found for type {scalar_type} in data connector {data_connector_name}"
    )]

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Inspect the operator collection in metadata/connector schema for the named scalar type and remove the duplicate entry
  2. If the duplicate comes from the connector itself, upgrade or patch the connector so its schema does not repeat operator names
  3. Regenerate the operator collection rather than hand-appending to it
Defensive patterns

Strategy: validation

Validate before calling

// De-duplicate operators per (scalar_type, operator_name, connector) before serializing metadata
const seen = new Set();
for (const op of operators) {
  const key = `${op.scalar_type}/${op.operator_name}`;
  if (seen.has(key)) throw new Error(`Duplicate operator ${key}`);
  seen.add(key);
}

Prevention

When it happens

Trigger: Loading a connector schema that lists the same operator name twice for one scalar type, or metadata that defines duplicate comparison operator entries for a type in one connector.

Common situations: Manually adding a comparison operator that already exists in the connector's defaults; merging metadata files that both define the same operator; connector bug emitting duplicate operator entries.

Related errors


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