{"record":{"id":"1f9cf9b37a2719da","repo":"quarkusio/quarkus","slug":"the-s-annotation-has-been-used-to-configure-the","errorCode":null,"errorMessage":"The '%s' annotation has been used to configure the '%s' OIDC client for the '%s' GraphQL client. However, the 'quarkus.oidc-client-graphql.\"%s\".client-name' configuration property sets the OIDC client to '%s'. Please choose one way to configure the OIDC client name.","messagePattern":"The '(.+?)' annotation has been used to configure the '(.+?)' OIDC client for the '(.+?)' GraphQL client\\. However, the 'quarkus\\.oidc-client-graphql\\.\"(.+?)\"\\.client-name' configuration property sets the OIDC client to '(.+?)'\\. Please choose one way to configure the OIDC client name\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/oidc-client-graphql/deployment/src/main/java/io/quarkus/oidc/client/graphql/OidcGraphQLClientIntegrationProcessor.java","lineNumber":66,"sourceCode":"\n    private static final String TOKEN_PROVIDER_CLASS = AbstractGraphQLTokenProvider.class.getName();\n\n    @BuildStep\n    void feature(BuildProducer<FeatureBuildItem> featureProducer) {\n        featureProducer.produce(new FeatureBuildItem(Feature.OIDC_CLIENT_GRAPHQL_CLIENT_INTEGRATION));\n    }\n\n    @BuildStep\n    GraphQLTokenProducerInfo collectGraphQLTokenProducerInfo(OidcClientGraphQLConfig config,\n            CombinedIndexBuildItem combinedIndex) {\n        var configKeysToOidcClientsFromIndex = getConfigKeysToOidcClientsFromIndex(combinedIndex.getIndex(), false);\n\n        // named OIDC clients\n        var configKeysToOidcClients = new HashMap<>(configKeysToOidcClientsFromIndex);\n        config.additionalOidcClients().forEach((graphQlClient, oidcClient) -> {\n            var previousOidcClient = configKeysToOidcClients.put(graphQlClient, oidcClient.clientName());\n            if (previousOidcClient != null && !previousOidcClient.equals(oidcClient.clientName())) {\n                throw new ConfigurationException(\"\"\"\n                        The '%s' annotation has been used to configure the '%s' OIDC client for the '%s' GraphQL client.\n                        However, the 'quarkus.oidc-client-graphql.\"%s\".client-name' configuration property\n                        sets the OIDC client to '%s'. Please choose one way to configure the OIDC client name.\n                        \"\"\".formatted(OIDC_CLIENT_FILTER, previousOidcClient, graphQlClient, graphQlClient,\n                        oidcClient.clientName()));\n            }\n        });\n\n        Map<String, String> oidcClientToTokenProducerBeanName = new HashMap<>();\n        configKeysToOidcClients.values().forEach(oidcClient -> oidcClientToTokenProducerBeanName\n                .putIfAbsent(oidcClient, generatedBeanClassName(oidcClient)));\n\n        // default OIDC client used when the GraphQL client doesn't have explicitly assigned another client\n        config.clientName().ifPresentOrElse(defaultOidcClientName -> oidcClientToTokenProducerBeanName\n                .putIfAbsent(defaultOidcClientName, generatedBeanClassName(defaultOidcClientName)),\n                () -> oidcClientToTokenProducerBeanName.put(DEFAULT_CLIENT_KEY, generatedBeanClassName(DEFAULT_CLIENT_KEY)));\n\n        return new GraphQLTokenProducerInfo(oidcClientToTokenProducerBeanName, configKeysToOidcClientsFromIndex);","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/oidc-client-graphql/deployment/src/main/java/io/quarkus/oidc/client/graphql/OidcGraphQLClientIntegrationProcessor.java#L48-L84","documentation":"The OIDC-GraphQL integration build step detects how each GraphQL client's OIDC client is chosen: via the @OIDCClient annotation or via quarkus.oidc-client-graphql.\"key\".client-name config. This ConfigurationException is thrown at build time when both are used and disagree, so the target OIDC client is ambiguous.","triggerScenarios":"Annotating a GraphQL client with @OIDCClient(\"a\") while application.properties sets quarkus.oidc-client-graphql.\"<key>\".client-name=b for the same GraphQL client config key.","commonSituations":"Adding the annotation to code that already had config-based client naming (or vice versa) during refactoring; team members configuring the same client in two ways; copying examples that mix both styles.","solutions":["Remove the quarkus.oidc-client-graphql.\"<key>\".client-name property and keep the @OIDCClient annotation","Or remove the @OIDCClient annotation and configure only via the property","Make both mechanisms name the same OIDC client","Search application.properties/yaml for all quarkus.oidc-client-graphql entries for this key"],"exampleFix":"# before\n@OIDCClient(\"clients\")\nquarkus.oidc-client-graphql.\"my-client\".client-name=other\n\n# after\n@OIDCClient(\"clients\")\n# property removed","handlingStrategy":"validation","validationCode":"String annClient = graphQLClient.getAnnotation(OIDCClient.class) != null ? graphQLClient.getAnnotation(OIDCClient.class).value() : null;\nString cfgClient = config.getClientName(configKey);\nif (annClient != null && cfgClient != null && !annClient.equals(cfgClient)) throw new IllegalStateException(\"OIDC client naming conflict for \" + configKey);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pick one mechanism: either @OIDCClient annotation or quarkus.oidc-client-graphql.\"key\".client-name","Grep config files for quarkus.oidc-client-graphql entries before adding annotations","Document per-client naming choice in the team wiki"],"tags":["graphql","oidc","config-conflict","build-time"],"backgroundTag":"ambiguous-client-configuration","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"}