graphql.execution.instrumentation.parameters.InstrumentationFieldParameters Maven / Gradle / Ivy
package graphql.execution.instrumentation.parameters;
import graphql.PublicApi;
import graphql.execution.ExecutionContext;
import graphql.execution.ExecutionStepInfo;
import graphql.execution.instrumentation.Instrumentation;
import graphql.execution.instrumentation.InstrumentationState;
import graphql.schema.GraphQLFieldDefinition;
import java.util.function.Supplier;
/**
* Parameters sent to {@link Instrumentation} methods
*/
@PublicApi
public class InstrumentationFieldParameters {
private final ExecutionContext executionContext;
private final Supplier executionStepInfo;
public InstrumentationFieldParameters(ExecutionContext executionContext, Supplier executionStepInfo) {
this.executionContext = executionContext;
this.executionStepInfo = executionStepInfo;
}
public ExecutionContext getExecutionContext() {
return executionContext;
}
public GraphQLFieldDefinition getField() {
return executionStepInfo.get().getFieldDefinition();
}
public ExecutionStepInfo getExecutionStepInfo() {
return executionStepInfo.get();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy