{"record":{"id":"08da7e95f64b0dd0","repo":"quarkusio/quarkus","slug":"graphql-graphql-client-d-ts-not-found-on-classpath","errorCode":null,"errorMessage":"graphql/graphql-client.d.ts not found on classpath","messagePattern":"graphql/graphql-client\\.d\\.ts not found on classpath","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLProcessor.java","lineNumber":533,"sourceCode":"            return;\n        }\n\n        ClassLoader tccl = Thread.currentThread().getContextClassLoader();\n        try (InputStream is = tccl.getResourceAsStream(\"graphql/graphql-client.js\")) {\n            if (is == null) {\n                throw new IllegalStateException(\"graphql/graphql-client.js not found on classpath\");\n            }\n            staticResourceProducer.produce(\n                    new GeneratedStaticResourceBuildItem(\n                            \"/_static/quarkus-graphql/graphql-client.js\",\n                            IoUtil.readBytes(is)));\n        } catch (IOException e) {\n            throw new UncheckedIOException(e);\n        }\n\n        try (InputStream is = tccl.getResourceAsStream(\"graphql/graphql-client.d.ts\")) {\n            if (is == null) {\n                throw new IllegalStateException(\"graphql/graphql-client.d.ts not found on classpath\");\n            }\n            staticResourceProducer.produce(\n                    new GeneratedStaticResourceBuildItem(\n                            \"/_static/quarkus-graphql/graphql-client.d.ts\",\n                            IoUtil.readBytes(is)));\n        } catch (IOException e) {\n            throw new UncheckedIOException(e);\n        }\n\n        Schema schema = schemaBuildItem.getSchema();\n        String resolvedPath = httpRootPathBuildItem.resolvePath(graphQLConfig.rootPath());\n        String proxyJs = generateGraphQLProxy(schema, resolvedPath);\n        staticResourceProducer.produce(\n                new GeneratedStaticResourceBuildItem(\n                        \"/_static/quarkus-graphql-api/graphql-api.js\",\n                        proxyJs.getBytes(StandardCharsets.UTF_8)));\n\n        String proxyDts = generateGraphQLDeclarations(schema);","sourceCodeStart":515,"sourceCodeEnd":551,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLProcessor.java#L515-L551","documentation":"SmallRyeGraphQLProcessor.generateJsClient also emits the TypeScript declaration file graphql/graphql-client.d.ts alongside the JS client for the GraphQL UI. If that resource is absent from the extension's classpath, it throws IllegalStateException 'graphql/graphql-client.d.ts not found on classpath'. Like its .js counterpart, this signals inconsistent extension artifacts rather than user code.","triggerScenarios":"Build-time generation of GraphQL UI static resources when the deployment classloader cannot resolve graphql/graphql-client.d.ts — corrupted or partially published quarkus-smallrye-graphql artifacts, version skew between Quarkus modules, or stripped resources in repackaged artifacts.","commonSituations":"Interruption during a Maven download leaving truncated jars; manually overridden quarkus-smallrye-graphql version against a different Quarkus core; enterprise mirrors/proxies serving incomplete artifacts; stale target/ directories after Quarkus upgrade.","solutions":["Delete ~/.m2/repository/io/quarkus/quarkus-smallrye-graphql* and rebuild with -U to re-download intact artifacts","Run a full ./mvnw clean build to remove stale incremental outputs","Align all Quarkus dependencies to one version via the quarkus-bom import (check mvn dependency:tree for mixed versions)","Disable the GraphQL UI (quarkus.smallrye-graphql.ui.enabled=false) if it is not required"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Check both UI client resources exist in the extension jar\nString[] required = {\"graphql/graphql-client.js\", \"graphql/graphql-client.d.ts\"};\ntry (JarFile jar = new JarFile(pathToQuarkusSmallryeGraphqlJar)) {\n    for (String r : required) {\n        if (jar.getEntry(r) == null) throw new IllegalStateException(\"Missing resource: \" + r);\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Align quarkus-smallrye-graphql with the Quarkus BOM version","Avoid mirrors stripping jar entries; verify artifact checksums","Clean local repo entries if downloads are flaky","Skip UI generation in production images where not needed"],"tags":["graphql","classpath","typescript","build-time"],"backgroundTag":"missing-classpath-resource","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}