hasura/graphql-engine · error
argument {argument_name} on field {field_name} of type {type
Error message
argument {argument_name} on field {field_name} of type {type_name} not found What it means
Validation error from lang-graphql thrown when a single named argument referenced on a field does not exist on that field of the given type. Unlike ArgumentsNotFound (which reports a batch of expected arguments), this points at one specific argument name.
Source
Thrown at v3/crates/graphql/lang-graphql/src/validation/error.rs:164
#[error("there should only be one anonymous operation in the document")]
AnonymousOperationMustBeUnique,
#[error("no mutations are defined in the schema")]
NoMutationsAreDefined,
#[error("no subscriptions are defined in the schema")]
NoSubscriptionsAreDefined,
#[error("internal error: selection root is not of object type")]
InternalSelectionRootIsNotObject,
#[error("operation not found: {operation_name}")]
OperationNotFound { operation_name: ast::Name },
#[error("no anonymous operation found in the document")]
AnonymousOperationNotFound,
#[error("expected arguments '{}' on field {field_name} of type {type_name} are not found", argument_names.iter().map(ToString::to_string).collect::<Vec<_>>().join(", "))]
ArgumentsNotFound {
type_name: ast::TypeName,
field_name: ast::Name,
argument_names: Vec<ast::Name>,
},
#[error("argument {argument_name} on field {field_name} of type {type_name} not found")]
ArgumentNotFound {
type_name: ast::TypeName,
field_name: ast::Name,
argument_name: ast::Name,
},
#[error(
"argument {argument_name} on field {field_name} of type {type_name} is defined more than once"
)]
DuplicateArguments {
type_name: ast::TypeName,
field_name: ast::Name,
argument_name: ast::Name,
},
#[error(
"required argument {argument_name} not found on field {field_name} of type {type_name}"
)]
RequiredArgumentNotFound {
type_name: ast::TypeName,View on GitHub (pinned to 724551b9ae)
Solutions
- Fix or remove the argument named in the error message on the reported field
- Verify the argument exists on that exact field in the schema (introspect if unsure)
- Regenerate typed client code after schema changes
Example fix
# before
query { user(id: 1) } # user has no id argument
# after
query { userById(id: 1) } Defensive patterns
Strategy: validation
Validate before calling
// Introspect the field's args once and check before sending let arg_names: HashSet<&str> = schema_field_args(field, type_name); assert!(arg_names.contains(requested_arg), "unknown argument");
Try / catch
// Catch Error::ArgumentNotFound { argument_name, field_name, .. } and map to a user-facing 'unknown argument' message Prevention
- Use typed/generated clients
- Introspect the schema when building dynamic queries
When it happens
Trigger: A document contains `field(unknownArg: value)` and normalize_arguments cannot resolve unknownArg against the field definition for field_name on type_name.
Common situations: Typos in argument names, schema drift between client and server, using arguments defined on a different field, camelCase/snake_case mismatches.
Related errors
- validation failed: {0}
- Unexpected value: expecting {expected_kind:}, but found: {fo
- '{name:}' is not a valid GraphQL name.
- '{alias:} is not a valid alias
- {value} is not a valid limit value
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/f16aaf42dd6571db.
Report an issue: GitHub.