hasura/graphql-engine · error · GraphqlConfigError

the fieldName for argumentsInput needs to be defined in Grap

Error message

the fieldName for argumentsInput needs to be defined in GraphqlConfig, when models have argumentsInputType

What it means

Raised when a model exposes an `argumentsInputType` (custom command/procedure arguments modeled as a GraphQL input) but GraphqlConfig does not define the fieldName for `argumentsInput`. The argument input object name must be configured to generate the schema. Thrown by the graphql_config resolution stage.

Source

Thrown at v3/crates/metadata-resolve/src/stages/graphql_config/error.rs:39

    )]
    MissingFilterInputFieldInGraphqlConfig,
    #[error(
        "the orderByInput needs to be defined in GraphqlConfig, when models have orderByExpressionType"
    )]
    MissingOrderByInputFieldInGraphqlConfig,
    #[error(
        "the orderByInput.enumTypeNames needs to be defined in GraphqlConfig, when models have orderByExpressionType"
    )]
    MissingOrderByEnumTypeNamesInGraphqlConfig,
    #[error(
        "only one enumTypeNames can be defined in GraphqlConfig, whose direction values are both 'asc' and 'desc'."
    )]
    MultipleOrderByEnumTypeNamesInGraphqlConfig,
    #[error(
        "invalid directions: {directions} defined in orderByInput of GraphqlConfig , currently there is no support for partial directions. Please specify a type which has both 'asc' and 'desc' directions"
    )]
    InvalidOrderByDirection { directions: String },
    #[error(
        "the fieldName for argumentsInput needs to be defined in GraphqlConfig, when models have argumentsInputType"
    )]
    MissingArgumentsInputFieldInGraphqlConfig,
    #[error(
        "the filterInputFieldName for aggregate needs to be defined in GraphqlConfig, when models have a selectAggregate graphql API"
    )]
    MissingAggregateFilterInputFieldNameInGraphqlConfig,
    #[error("\"{name:}\" is not a valid GraphQL name.")]
    InvalidGraphQlName { name: String },
    #[error("multiple graphql types found with the same name: {graphql_type_name:}")]
    ConflictingGraphQlType { graphql_type_name: ast::TypeName },
}

impl ContextualError for GraphqlConfigError {
    fn create_error_context(&self) -> Option<error_context::Context> {
        None
    }
}

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Add `argumentsInput: {fieldName: "args"}` (or your preferred name) to GraphqlConfig
  2. Verify all models using argumentsInputType are covered by the single shared config
  3. Regenerate metadata with current tooling that emits argumentsInput

Example fix

// before
{"graphql": {}, "models": [{"argumentsInputType": "command_args"}]}
// after
{"graphql": {"argumentsInput": {"fieldName": "args"}}, "models": [{"argumentsInputType": "command_args"}]}
Defensive patterns

Strategy: validation

Validate before calling

let uses_args = models.iter().any(|m| m.arguments_input_type.is_some());
if uses_args {
    assert!(config.arguments_input.as_ref().is_some_and(|a| a.field_name.is_some()));
}

Type guard

fn arguments_ok(config: &GraphqlConfig, models: &[Model]) -> bool {
    !models.iter().any(|m| m.arguments_input_type.is_some())
        || config.arguments_input.as_ref().is_some_and(|a| a.field_name.is_some())
}

Try / catch

Err(GraphqlConfigError::MissingArgumentsInputFieldInGraphqlConfig) => { /* add argumentsInput.fieldName and re-resolve */ }

Prevention

When it happens

Trigger: Metadata declares a model/command with argumentsInputType while GraphqlConfig has no argumentsInput entry; resolving or validating the metadata fails.

Common situations: Adding command/action models that take structured arguments without extending the graphql config; metadata migrations that previously defaulted the arguments input name; partial hand-authored GraphqlConfig.

Related errors


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