{"record":{"id":"a92438308d9aeb6b","repo":"hasura/graphql-engine","slug":"introspection-query-failed-0","errorCode":null,"errorMessage":"introspection query failed: {0}","messagePattern":"introspection query failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/crates/graphql/lang-graphql/src/generate_graphql_schema.rs","lineNumber":21,"sourceCode":"for 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<\n    S: crate::schema::SchemaContext,\n    NSGet: crate::schema::NamespacedGetter<S>,\n>(\n    namespaced_getter: &NSGet,\n    schema: &crate::schema::Schema<S>,\n) -> Result<serde_json::Value, Error> {","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/graphql/lang-graphql/src/generate_graphql_schema.rs#L3-L39","documentation":"Wrapper around errors from the introspection execution module itself: the introspection query ran but the introspection resolver returned an error (detailed message in {0}). It aggregates any failure while building the schema response for introspection.","triggerScenarios":"Executing introspection when the introspection resolver fails — e.g. encountering an invalid type or field name while walking the schema, or internal invariants breaking while serializing the schema.","commonSituations":"Schemas containing exotic or invalid names; partially built schemas during startup; introspecting before metadata is fully applied.","solutions":["Read the inner error message to identify the concrete introspection failure","Ensure metadata is fully applied and the schema is valid before introspecting","Upgrade the engine if the inner error indicates an internal bug","Reproduce with a minimal schema and report upstream"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Ensure schema is fully built before exposing introspection\nif (!engine.isReady()) return 503;","typeGuard":null,"tryCatchPattern":"// Catch, unwrap the inner introspection error ({0}) and surface its concrete message","preventionTips":["Apply metadata completely before introspecting","Keep schema names/descriptions clean"],"tags":["graphql","introspection","wrapper"],"backgroundTag":"introspection-query-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}