hasura/graphql-engine · warning · ScalarBooleanExpressionTypeIssue

a graphql section is defined in boolean expression type

Error message

a graphql section is defined in boolean expression type '{type_name}' but it will not appear in the GraphQL API unless the is_null operator field name is also configured in the GraphqlConfig in query.filterInputConfig

What it means

A warning-level issue: the boolean expression type has a graphql section, but the is_null operator field name is missing from GraphqlConfig's query.filterInputConfig, and since all properties must be set, the boolean expression will not appear in the GraphQL API.

Solutions

  1. Add the is_null operator field name to GraphqlConfig query.filterInputConfig
  2. Ensure all filterInputConfig properties are set consistently

Example fix

// before
query:
  filterInputConfig:
    logical_operator_names:
      and: "_and"
      or: "_or"
      not: "_not"
// after
query:
  filterInputConfig:
    is_null: "is_null"
    logical_operator_names:
      and: "_and"
      or: "_or"
      not: "_not"
Defensive patterns

Strategy: validation

Validate before calling

if graphql_config.filter_input_config.is_null.is_none() {
    return Err("filterInputConfig missing is_null name");
}

Prevention

When it happens

Trigger: Declaring a boolean expression type with a graphql block while GraphqlConfig query.filterInputConfig sets logical operators but omits is_null.

Common situations: Configuring only logical operator names and forgetting the is_null field name in filterInputConfig.

Related errors


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

Appendix: source

Thrown at v3/crates/metadata-resolve/src/stages/scalar_boolean_expressions/error.rs:74

        None
    }
}

#[derive(Debug, thiserror::Error)]
pub enum ScalarBooleanExpressionTypeIssue {
    // Because the GraphqlConfig's filterInputConfig requires all properties to be set, the effective meaning of not
    // having the is_null operator set is that the entire boolean expression cannot be rendered in GraphQL and so we
    // communicate that effect here, even though this issue is only about logical operators specifically.
    #[error(
        "a graphql section is defined in boolean expression type '{type_name}' but it will not appear in the GraphQL API unless logical operator field names are also configured in the GraphqlConfig in query.filterInputConfig"
    )]
    MissingLogicalOperatorNamesInGraphqlConfig {
        type_name: Qualified<CustomTypeName>,
    },
    // Because the GraphqlConfig's filterInputConfig requires all properties to be set, the effective meaning of not
    // having the is_null operator set is that the entire boolean expression cannot be rendered in GraphQL and so we
    // communicate that effect here, even though this issue is only about the is null operator specifically.
    #[error(
        "a graphql section is defined in boolean expression type '{type_name}' but it will not appear in the GraphQL API unless the is_null operator field name is also configured in the GraphqlConfig in query.filterInputConfig"
    )]
    MissingIsNullOperatorNameInGraphqlConfig {
        type_name: Qualified<CustomTypeName>,
    },
    #[error(
        "the boolean expression '{type_name}' has enabled logical operators, but they will not appear in the GraphQL API unless you update your CompatibilityConfig date to at least 2024-11-26"
    )]
    LogicalOperatorsUnavailable {
        type_name: Qualified<CustomTypeName>,
    },
    #[error(
        "the boolean expression '{type_name}' has a GraphQL field name conflict between the '{name}' {name_source_1} and the '{name}' {name_source_2}. One of these will need to be renamed."
    )]
    GraphqlFieldNameConflict {
        type_name: Qualified<CustomTypeName>,
        name: String,
        name_source_1: FieldNameSource,

View on GitHub (pinned to 724551b9ae)