hasura/graphql-engine · info · ArgumentSource

model '{0}'

Error message

model '{0}'

What it means

This is not a thrown error: it is the Display/Error formatting for ArgumentSource::Model, i.e. the string 'model '<name>'' used when an ArgumentSource is rendered inside error messages (typically as context when an argument belonging to a model has an issue). The actual failure is carried by a wrapping error; this text only names the model the problematic argument belongs to.

Source

Thrown at v3/crates/metadata-resolve/src/stages/arguments/types.rs:15

use std::collections::BTreeMap;

use crate::stages::boolean_expressions;
use crate::types::error::ContextualError;
use crate::types::subgraph::ArgumentKind;
use crate::{Qualified, QualifiedTypeReference};
use indexmap::IndexMap;
use open_dds::arguments::ArgumentName;
use open_dds::commands::CommandName;
use open_dds::models::ModelName;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, thiserror::Error, Eq, Ord, PartialEq, PartialOrd)]
pub enum ArgumentSource {
    #[error("model '{0}'")]
    Model(Qualified<ModelName>),
    #[error("command '{0}'")]
    Command(Qualified<CommandName>),
}

pub struct ArgumentsOutput {
    pub arguments: BTreeMap<ArgumentSource, IndexMap<ArgumentName, ArgumentInfo>>,
    pub issues: Vec<ArgumentIssue>,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
pub struct ArgumentInfo {
    pub argument_type: QualifiedTypeReference,
    pub description: Option<String>,
    pub argument_kind: ArgumentKind,
    pub type_representation: Option<ndc_models::TypeRepresentation>,
}

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Look at the surrounding error text: the real issue (usually a BooleanExpressionIssue) follows this model name
  2. Open that model's OpenDD definition and fix the flagged argument (often its boolean expression type)
  3. Rebuild metadata to verify
Defensive patterns

Strategy: try-catch

Try / catch

// This is context text, not an error: handle the wrapping error (usually ArgumentIssue/BooleanExpressionIssue) and use this model name to locate the source YAML.

Prevention

When it happens

Trigger: Surfaced as context whenever the arguments resolution stage reports a problem (e.g. an ArgumentIssue::BooleanExpressionIssue) for an argument defined on a model. Any error that formats an ArgumentSource will render this fragment.

Common situations: Appears in build output when a model argument uses a boolean expression type that itself has issues; the 'model '...'' prefix tells you which model's argument to fix.

Related errors


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