quarkusio/quarkus · error · IllegalStateException

GraphQL client with config key '%s' wasn't present in the co

Error message

GraphQL client with config key '%s' wasn't present in the combined index, therefore Quarkus didn't generate required OIDC token provider

What it means

The OIDC GraphQL integration processor validates that each GraphQL client config key found via its own index also appears in the combined index that produced the OIDC token producer beans. This IllegalStateException is a build-time consistency check: if the combined index lacks the client, Quarkus did not generate the required token provider and codegen would fail downstream.

Source

Thrown at extensions/oidc-client-graphql/deployment/src/main/java/io/quarkus/oidc/client/graphql/OidcGraphQLClientIntegrationProcessor.java:147

                    .reason(getClass().getName())
                    .publicConstructors().methods().fields().build());
        });
    }

    @BuildStep
    @Record(RUNTIME_INIT)
    void initialize(BeanContainerBuildItem containerBuildItem,
            OidcGraphQLClientIntegrationRecorder recorder,
            OidcClientGraphQLConfig config,
            BeanArchiveIndexBuildItem index,
            GraphQLTokenProducerInfo graphQLTokenProducerInfo,
            GraphQLClientConfigInitializedBuildItem configInitialized) {
        Map<String, String> configKeysToOidcClients = getConfigKeysToOidcClientsFromIndex(index.getIndex(), true);
        configKeysToOidcClients.forEach((graphQLConfigKey, oidcClient) -> {
            if (!graphQLTokenProducerInfo.configKeysToOidcClientsFromCombinedIndex.containsValue(oidcClient)) {
                // ATM GraphQL extension processor relies on the combined index as well, this validation is in place
                // so that we don't miss future changes
                throw new IllegalStateException("GraphQL client with config key '%s' wasn't present in the combined index,"
                        + " therefore Quarkus didn't generate required OIDC token provider");
            }
        });
        config.additionalOidcClients()
                .forEach((graphQlClient, oidcClient) -> configKeysToOidcClients.put(graphQlClient, oidcClient.clientName()));

        recorder.enhanceGraphQLClientConfigurationWithOidc(configKeysToOidcClients,
                config.clientName().orElse(DEFAULT_CLIENT_KEY),
                graphQLTokenProducerInfo.oidcClientToTokenProducerBeanName);
    }

    private static Map<String, String> getConfigKeysToOidcClientsFromIndex(IndexView index, boolean withDefault) {
        Map<String, String> configKeysToOidcClients = new HashMap<>();
        for (AnnotationInstance annotation : index.getAnnotations(GRAPHQL_CLIENT_API)) {
            ClassInfo clazz = annotation.target().asClass();
            AnnotationInstance oidcClient = clazz.annotation(OIDC_CLIENT_FILTER);
            if (oidcClient != null) {

View on GitHub (pinned to e1c734241f)

Solutions

  1. Ensure the module containing the GraphQL client interface is Jandex-indexed (add jandex-maven-plugin or quarkus-index-dependency)
  2. Verify the GraphQL client class is in the application or an indexed dependency
  3. Rebuild with the index including all client interfaces
  4. If developing Quarkus itself, check getConfigKeysToOidcClientsFromIndex flags match between processors

Example fix

<!-- before: library without index -->
<!-- after -->
<plugin>
  <groupId>io.smallrye</groupId>
  <artifactId>jandex-maven-plugin</artifactId>
  <executions><execution><goals><goal>jandex</goal></goals></execution></executions>
</plugin>
Defensive patterns

Strategy: validation

Validate before calling

// at build/deploy time: verify combined index sees the client interface
if (!combinedIndex.getClassByName(clientInterfaceName).isPresent()) {
    throw new IllegalStateException(clientInterfaceName + " missing from Jandex combined index; add jandex index to its module");
}

Prevention

When it happens

Trigger: Running the initialize build step when a GraphQL client config key maps to an OIDC client that is not among configKeysToOidcClientsFromCombinedIndex — i.e. the class containing the GraphQL client was not indexed in the combined (application+dependencies) Jandex index.

Common situations: GraphQL client interface in a module excluded from the combined index; missing Jandex index (no META-INF/jandex.idx and no @RegisterForReflection/index dependency) in a library; ordering issues between extension processors after adding a new integration path.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/664dae97f031785c. Report an issue: GitHub.