{"record":{"id":"50fa38b77559508c","repo":"hasura/graphql-engine","slug":"argument-mapping-not-found-for-argument-name","errorCode":null,"errorMessage":"argument mapping not found for {argument_name}","messagePattern":"argument mapping not found for (.+?)","errorType":"error_code","errorClass":"ArgumentPresetExecutionError","httpStatus":null,"severity":"error","filePath":"v3/crates/plan/src/query/arguments.rs","lineNumber":394,"sourceCode":"    )]\n    IllegalCharactersInHeaderValue,\n    #[error(\"Model source not found for model '{model_name}'\")]\n    ModelSourceNotFound { model_name: Qualified<ModelName> },\n    #[error(\"Model permissions for model {model_name} not found for role {role}\")]\n    ModelArgumentPresetsNotFound {\n        role: Role,\n        model_name: Qualified<ModelName>,\n    },\n    #[error(\"command {command_name} does not have a source defined\")]\n    CommandSourceNotFound {\n        command_name: Qualified<CommandName>,\n    },\n    #[error(\"command permissions for command {command_name} not found for role {role}\")]\n    CommandArgumentPresetsNotFound {\n        command_name: Qualified<CommandName>,\n        role: Role,\n    },\n    #[error(\"argument mapping not found for {argument_name}\")]\n    ArgumentMappingNotFound { argument_name: ArgumentName },\n    #[error(\"type mapping not found for object {object_type_name}\")]\n    TypeMappingNotFound {\n        object_type_name: Qualified<CustomTypeName>,\n    },\n    #[error(\n        \"no data connector field mapping found for field '{field_name}' of object type '{object_type_name}'\"\n    )]\n    FieldMappingNotFound {\n        object_type_name: Qualified<CustomTypeName>,\n        field_name: FieldName,\n    },\n    #[error(\n        \"no field definition found for field '{field_name}' of object type '{object_type_name}'\"\n    )]\n    FieldDefinitionNotFound {\n        object_type_name: Qualified<CustomTypeName>,\n        field_name: FieldName,","sourceCodeStart":376,"sourceCodeEnd":412,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/plan/src/query/arguments.rs#L376-L412","documentation":"ArgumentMappingNotFound is thrown when the planner needs an argument's mapping (how a GraphQL/external argument maps to the underlying source parameter) for the named ArgumentName and it does not exist. This is a metadata-completeness error: every referenced argument must have a mapping entry.","triggerScenarios":"A query or command definition references an argument (e.g. 'limit', 'where', or a custom argument) that has no mapping defined in the argument mappings section of metadata during preset resolution.","commonSituations":"Adding an argument to a command/model type but forgetting its mapping; renaming an argument in one place only; upgrading a connector whose argument names changed while metadata kept old names.","solutions":["Add a mapping entry for the named argument in the relevant command/model metadata","Check for spelling/case mismatch between the argument used in the query and the mapping key","Regenerate or update mappings after changing connector argument names","Run metadata validation before deploying"],"exampleFix":"// before\n{\"argumentMappings\":{\"id\":{}}}\n// after\n{\"argumentMappings\":{\"id\":{},\"email\":{}}}","handlingStrategy":"validation","validationCode":"fn argument_mapping_exists(mappings: &BTreeMap<ArgumentName, _>, arg: &ArgumentName) -> bool {\n    mappings.contains_key(arg)\n}","typeGuard":"fn is_argument_mapping_not_found(e: &ArgumentPresetExecutionError) -> bool {\n    matches!(e, ArgumentPresetExecutionError::ArgumentMappingNotFound { .. })\n}","tryCatchPattern":"match result {\n    Err(PlanError::Arguments(ArgumentPresetExecutionError::ArgumentMappingNotFound { argument_name })) => {\n        bad_request(format!(\"no mapping for argument {argument_name}\"));\n    }\n    other => other,\n}","preventionTips":["Derive argument lists and their mappings from a single source of truth (schema or codegen)","Diff argument mappings against connector parameters on connector upgrades","Reject unknown arguments at the API boundary before planning"],"tags":["rust","arguments","mapping","metadata"],"backgroundTag":"metadata-mapping-missing","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}