All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.smallrye.graphql.runtime.spi.datafetcher.QuarkusDataFetcherService Maven / Gradle / Ivy

There is a newer version: 3.17.0.CR1
Show newest version
package io.quarkus.smallrye.graphql.runtime.spi.datafetcher;

import io.smallrye.graphql.execution.datafetcher.PlugableBatchableDataFetcher;
import io.smallrye.graphql.schema.model.Operation;
import io.smallrye.graphql.schema.model.Type;
import io.smallrye.graphql.spi.DataFetcherService;

/**
 * Some Quarkus specific datafetchers to execute reactive on the correct thread
 */
public class QuarkusDataFetcherService implements DataFetcherService {

    private final int priority = 1;

    @Override
    public Integer getPriority() {
        return priority;
    }

    @Override
    public PlugableBatchableDataFetcher getUniDataFetcher(Operation operation, Type type) {
        return new QuarkusUniDataFetcher(operation, type);
    }

    @Override
    public PlugableBatchableDataFetcher getDefaultDataFetcher(Operation operation, Type type) {
        return new QuarkusDefaultDataFetcher(operation, type);
    }

    @Override
    public PlugableBatchableDataFetcher getCompletionStageDataFetcher(Operation operation, Type type) {
        return new QuarkusCompletionStageDataFetcher(operation, type);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy