{"record":{"id":"083d7a5eaf5a9b0e","repo":"hasura/graphql-engine","slug":"name-is-not-a-valid-graphql-name-083d7a","errorCode":null,"errorMessage":"\"{name:}\" is not a valid GraphQL name.","messagePattern":"\"(.+?)\" is not a valid GraphQL name\\.","errorType":"validation","errorClass":"GraphqlConfigError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/graphql_config/error.rs","lineNumber":47,"sourceCode":"    )]\n    MissingOrderByEnumTypeNamesInGraphqlConfig,\n    #[error(\n        \"only one enumTypeNames can be defined in GraphqlConfig, whose direction values are both 'asc' and 'desc'.\"\n    )]\n    MultipleOrderByEnumTypeNamesInGraphqlConfig,\n    #[error(\n        \"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\"\n    )]\n    InvalidOrderByDirection { directions: String },\n    #[error(\n        \"the fieldName for argumentsInput needs to be defined in GraphqlConfig, when models have argumentsInputType\"\n    )]\n    MissingArgumentsInputFieldInGraphqlConfig,\n    #[error(\n        \"the filterInputFieldName for aggregate needs to be defined in GraphqlConfig, when models have a selectAggregate graphql API\"\n    )]\n    MissingAggregateFilterInputFieldNameInGraphqlConfig,\n    #[error(\"\\\"{name:}\\\" is not a valid GraphQL name.\")]\n    InvalidGraphQlName { name: String },\n    #[error(\"multiple graphql types found with the same name: {graphql_type_name:}\")]\n    ConflictingGraphQlType { graphql_type_name: ast::TypeName },\n}\n\nimpl ContextualError for GraphqlConfigError {\n    fn create_error_context(&self) -> Option<error_context::Context> {\n        None\n    }\n}\n","sourceCodeStart":29,"sourceCodeEnd":58,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/graphql_config/error.rs#L29-L58","documentation":"Thrown by the graphql_config resolution stage when a generated or configured GraphQL name fails GraphQL name validation (names must match /[_A-Za-z][_0-9A-Za-z]*/). The resolver validates type names, field names, and argument names it derives from model metadata before building the schema. An invalid name (spaces, leading digits, hyphens, unicode) aborts metadata resolution.","triggerScenarios":"Naming a model, command, argument, type, or GraphQL config field with characters invalid in GraphQL (e.g. `2_users`, `user-name`, `user name`), which then flows into a generated GraphQL name during the graphql_config stage.","commonSituations":"Auto-generating names from database columns or table names containing hyphens/spaces; renaming metadata objects to match DB identifiers; locales/unicode in identifiers.","solutions":["Rename the offending entity (model/command/argument/type) to match ^[_A-Za-z][_0-9A-Za-z]*$ — the error includes the offending {name}","If the name comes from a database identifier, configure the connector's naming convention or add an explicit alias in the data connector link/metadata","Check the error's span/context to find which metadata object produced the name"],"exampleFix":"# before\nkind: Model\nversion: v1\ndefinition:\n  name: user-details\n\n# after\nkind: Model\nversion: v1\ndefinition:\n  name: userDetails","handlingStrategy":"validation","validationCode":"import re\nGRAPHQL_NAME = re.compile(r'^[_A-Za-z][_0-9A-Za-z]*$')\nassert GRAPHQL_NAME.match(name), f'{name!r} is not a valid GraphQL name'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Name metadata entities (models, commands, arguments, types) with GraphQL-safe identifiers from the start","Configure connector naming conventions to sanitize DB identifiers (hyphens/spaces) into camelCase"],"tags":["hasura","ddn","graphql","naming","validation"],"backgroundTag":"graphql-name-validation","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}