{"record":{"id":"3ed23633f3c7e09b","repo":"quarkusio/quarkus","slug":"quarkus-smallrye-graphql-root-path-ui-was-set-to","errorCode":null,"errorMessage":"quarkus.smallrye-graphql.root-path-ui was set to \"/\", this is not allowed as it blocks the application from serving anything else.","messagePattern":"quarkus\\.smallrye-graphql\\.root-path-ui was set to \"/\", this is not allowed as it blocks the application from serving anything else\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLProcessor.java","lineNumber":1262,"sourceCode":"            // Auto dis/enable\n            return linkedCapabilityIsPresent && activateByDefaultIfCapabilityIsPresent;\n        }\n    }\n\n    // UI Related\n\n    @BuildStep\n    void getGraphqlUiFinalDestination(\n            HttpRootPathBuildItem httpRootPath,\n            NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem,\n            LaunchModeBuildItem launchMode,\n            SmallRyeGraphQLConfig graphQLConfig,\n            BuildProducer<WebJarBuildItem> webJarBuildProducer) {\n\n        if (shouldInclude(launchMode, graphQLConfig)) {\n\n            if (\"/\".equals(graphQLConfig.ui().rootPath())) {\n                throw new ConfigurationException(\n                        \"quarkus.smallrye-graphql.root-path-ui was set to \\\"/\\\", this is not allowed as it blocks the application from serving anything else.\",\n                        Collections.singleton(\"quarkus.smallrye-graphql.root-path-ui\"));\n            }\n\n            String graphQLPath = httpRootPath.resolvePath(graphQLConfig.rootPath());\n            String graphQLUiPath = nonApplicationRootPathBuildItem.resolvePath(graphQLConfig.ui().rootPath());\n            String devUiPath = nonApplicationRootPathBuildItem.resolvePath(\"dev\");\n\n            webJarBuildProducer.produce(\n                    WebJarBuildItem.builder().artifactKey(GRAPHQL_UI_WEBJAR_ARTIFACT_KEY) //\n                            .root(GRAPHQL_UI_WEBJAR_STATIC_RESOURCES_PATH) //\n                            .filter(new WebJarResourcesFilter() {\n                                @Override\n                                public FilterResult apply(String fileName, InputStream file) throws IOException {\n                                    if (fileName.endsWith(FILE_TO_UPDATE)) {\n                                        String content = new String(file.readAllBytes(), StandardCharsets.UTF_8);\n                                        content = updateUrl(content, graphQLPath, LINE_TO_UPDATE,\n                                                LINE_FORMAT);","sourceCodeStart":1244,"sourceCodeEnd":1280,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLProcessor.java#L1244-L1280","documentation":"SmallRyeGraphQLProcessor's UI build step rejects a UI root path of \"/\" because routing everything under the non-application root to the GraphQL UI would shadow all other application endpoints. It throws Quarkus ConfigurationException explicitly naming the offending property quarkus.smallrye-graphql.root-path-ui.","triggerScenarios":"Setting quarkus.smallrye-graphql.root-path-ui=/ in application.properties (or the equivalent quarkus.smallrye-graphql.ui.root-path) and building/starting the application with the GraphQL UI included (non-test JVM or dev mode).","commonSituations":"Users wanting the UI at the site root mimicking hosted GraphQL playgrounds; copy-paste of config where root-path (GraphQL API) was intended instead of root-path-ui; misreading of root-path vs root-path-ui semantics.","solutions":["Set quarkus.smallrye-graphql.root-path-ui to a non-root path, e.g. /graphql-ui or /graphiql","Keep the API endpoint at quarkus.smallrye-graphql.root-path (e.g. /graphql) and only move the UI path — do not confuse the two properties","If the UI must be at '/', serve a custom redirect page yourself instead of relocating the UI route","Remove the property to fall back to the default UI root path"],"exampleFix":"// before\nquarkus.smallrye-graphql.root-path-ui=/\n// after\nquarkus.smallrye-graphql.root-path-ui=/graphql-ui","handlingStrategy":"validation","validationCode":"// Validate the UI root path before building\nString rootPathUi = System.getProperty(\"quarkus.smallrye-graphql.root-path-ui\", \"/graphql-ui\");\nif (\"/\".equals(rootPathUi)) {\n    throw new IllegalArgumentException(\"quarkus.smallrye-graphql.root-path-ui cannot be '/' - choose e.g. /graphql-ui\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never set root-path-ui to '/' ; use a dedicated sub-path","Distinguish root-path (API) from root-path-ui (UI) in configuration reviews","Test the application startup in dev mode after config changes to catch ConfigurationException early","Document the chosen UI path for the team"],"tags":["graphql","configuration","ui","routing"],"backgroundTag":"invalid-config-value","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}