hasura/graphql-engine · warning · BooleanExpressionIssue::DataConnectorDoesNotSupportNestedScalarArrayFiltering

The data connector '{data_connector_name}' does not support

Error message

The data connector '{data_connector_name}' does not support filtering by nested scalar arrays. The comparable field '{field_name}' within '{boolean_expression_type_name}' is of a scalar array type: {field_type}

What it means

Emitted when a comparable field inside a boolean expression type is a scalar array and the data connector does not support filtering by nested scalar arrays.

Source

Thrown at v3/crates/metadata-resolve/src/stages/boolean_expressions/types.rs:35

use ref_cast::RefCast;
use serde::{Deserialize, Serialize};
use serde_with::serde_as;
use std::collections::{BTreeMap, BTreeSet};
use std::fmt::Display;
use std::sync::Arc;

#[derive(Debug, thiserror::Error, Clone, PartialEq, Eq)]
pub enum BooleanExpressionIssue {
    #[error(
        "The data connector '{data_connector_name}' does not support filtering by nested object arrays. The comparable field '{field_name}' within {boolean_expression_type_name}' is of an object array type: {field_type}"
    )]
    DataConnectorDoesNotSupportNestedObjectArrayFiltering {
        data_connector_name: Qualified<DataConnectorName>,
        boolean_expression_type_name: Qualified<CustomTypeName>,
        field_name: FieldName,
        field_type: QualifiedTypeReference,
    },
    #[error(
        "The data connector '{data_connector_name}' does not support filtering by nested scalar arrays. The comparable field '{field_name}' within '{boolean_expression_type_name}' is of a scalar array type: {field_type}"
    )]
    DataConnectorDoesNotSupportNestedScalarArrayFiltering {
        data_connector_name: Qualified<DataConnectorName>,
        boolean_expression_type_name: Qualified<CustomTypeName>,
        field_name: FieldName,
        field_type: QualifiedTypeReference,
    },
    #[error(
        "the comparable field '{name}' is defined more than once in the boolean expression type '{type_name}'"
    )]
    DuplicateComparableFieldFound {
        type_name: Qualified<CustomTypeName>,
        name: FieldName,
    },
    #[error(
        "the comparable relationship '{name}' is defined more than once in the boolean expression type '{type_name}'"
    )]

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Unmark the scalar array field as comparable
  2. Model the array differently (JSON with supported operators, or a separate relationship) if filtering is needed
  3. Switch to a connector that supports scalar array comparisons

Example fix

// before
tags: [String]
  comparable: true
// after
tags: [String]
  comparable: false
Defensive patterns

Strategy: validation

Validate before calling

for f in &be_type.comparable_fields {
    if let QualifiedType::Array(inner) = &f.field_type.underlying {
        if matches!(**inner, QualifiedType::Scalar(_)) && !connector.capabilities.scalar_array_filters {
            return Err(format!("{} scalar array not filterable by {}", f.name, connector.name));
        }
    }
}

Type guard

fn is_scalar_array(t: &QualifiedTypeReference) -> bool {
    matches!(t.underlying(), QualifiedType::Array(inner) if matches!(**inner, QualifiedType::Scalar(_)))
}

Try / catch

if let BooleanExpressionIssue::DataConnectorDoesNotSupportNestedScalarArrayFiltering { field_name, data_connector_name, .. } = &issue {
    log::warn!("{data_connector_name} cannot filter {field_name}");
}

Prevention

When it happens

Trigger: A boolean expression comparable field whose QualifiedTypeReference resolves to a scalar array type, with a data connector that lacks scalar-array filter support.

Common situations: Making a `[String]` or `[Int]` column comparable in a boolean expression against a connector that cannot filter arrays (e.g. non-SQL sources like REST or certain native connectors).

Related errors


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