{"record":{"id":"e4f81a14011f9aed","repo":"hasura/graphql-engine","slug":"unable-to-normalize-introspection-query-0","errorCode":null,"errorMessage":"unable to normalize introspection query: {0}","messagePattern":"unable to normalize introspection query: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/crates/graphql/lang-graphql/src/generate_graphql_schema.rs","lineNumber":15,"sourceCode":"/*\nThis module provides functions to generate introspection result as GraphQL schema\nfor each namespace from the schema.\n */\nuse json_ext;\nuse std::collections::BTreeMap;\nuse std::sync::OnceLock;\nuse tracing_util::SpanVisibility;\nuse tracing_util::{ErrorVisibility, TraceableError};\n\n#[derive(Debug, thiserror::Error)]\npub enum Error {\n    #[error(\"unable to parse introspection query: {0}\")]\n    ParseIntrospectionQuery(String),\n    #[error(\"unable to normalize introspection query: {0}\")]\n    NormalizeIntrospectionQuery(String),\n    #[error(\"unable to find field call\")]\n    FieldCallNotFound,\n    #[error(\"Only __schema field is expected but found: {name:}\")]\n    OnlySchemaFieldExpected { name: String },\n    #[error(\"introspection query failed: {0}\")]\n    IntrospactionQueryError(#[from] crate::introspection::Error),\n    #[error(\"unable to serialize to json: {0}\")]\n    SerializeJson(#[from] serde_json::Error),\n}\nimpl TraceableError for Error {\n    fn visibility(&self) -> ErrorVisibility {\n        ErrorVisibility::User\n    }\n}\n\n/// Generate GraphQL schema for a given namespace\npub fn build_namespace_schema<","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/graphql/lang-graphql/src/generate_graphql_schema.rs#L1-L33","documentation":"The introspection query parsed but failed normalization — the engine's normalization pass (which canonicalizes the AST) returned an error. Like 668 this is an internal invariant on the fixed introspection query, not a user query problem.","triggerScenarios":"Running introspection (schema fetch from an IDE or codegen tool) when the normalization pass rejects the internal introspection AST; version mismatch between parser and normalizer crates.","commonSituations":"Inconsistent crate versions in a custom build; changes to normalization rules that break the stock introspection query template.","solutions":["Align engine and lang-graphql crate versions and rebuild","Update the introspection query template to match current normalization rules if you maintain a fork","Report upstream with the normalization error message"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Treat as internal: retry introspection once, then upgrade/report","preventionTips":["Use stock builds with aligned versions","Avoid forks altering normalization"],"tags":["graphql","introspection","normalization","internal"],"backgroundTag":"graphql-normalization-error","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}