graphql.kickstart.execution.config.DefaultExecutionStrategyProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphql-java-kickstart-javax Show documentation
Show all versions of graphql-java-kickstart-javax Show documentation
relay.js-compatible GraphQL servlet
The newest version!
package graphql.kickstart.execution.config;
import graphql.execution.ExecutionStrategy;
/** @author Andrew Potter */
public class DefaultExecutionStrategyProvider implements ExecutionStrategyProvider {
private final ExecutionStrategy queryExecutionStrategy;
private final ExecutionStrategy mutationExecutionStrategy;
private final ExecutionStrategy subscriptionExecutionStrategy;
public DefaultExecutionStrategyProvider() {
this(null);
}
public DefaultExecutionStrategyProvider(ExecutionStrategy executionStrategy) {
this(executionStrategy, executionStrategy, null);
}
public DefaultExecutionStrategyProvider(
ExecutionStrategy queryExecutionStrategy,
ExecutionStrategy mutationExecutionStrategy,
ExecutionStrategy subscriptionExecutionStrategy) {
this.queryExecutionStrategy = queryExecutionStrategy;
this.mutationExecutionStrategy = mutationExecutionStrategy;
this.subscriptionExecutionStrategy = subscriptionExecutionStrategy;
}
@Override
public ExecutionStrategy getQueryExecutionStrategy() {
return queryExecutionStrategy;
}
@Override
public ExecutionStrategy getMutationExecutionStrategy() {
return mutationExecutionStrategy;
}
@Override
public ExecutionStrategy getSubscriptionExecutionStrategy() {
return subscriptionExecutionStrategy;
}
}