com.spring.boxes.dollar.support.graphql.instrument.NestInstrumentationContext Maven / Gradle / Ivy
The newest version!
package com.spring.boxes.dollar.support.graphql.instrument;
import java.util.concurrent.CompletableFuture;
import com.spring.boxes.dollar.support.graphql.GraphqlPaths;
import graphql.ExecutionResult;
import graphql.execution.instrumentation.InstrumentationContext;
import graphql.execution.instrumentation.parameters.InstrumentationFieldCompleteParameters;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class NestInstrumentationContext implements InstrumentationContext {
private final InstrumentationFieldCompleteParameters parameters;
private NestInstrumentationContext(InstrumentationFieldCompleteParameters parameters) {
this.parameters = parameters;
}
public static NestInstrumentationContext context(InstrumentationFieldCompleteParameters parameters) {
return new NestInstrumentationContext(parameters);
}
@Override
public void onDispatched(CompletableFuture future) {
}
@Override
public void onCompleted(ExecutionResult result, Throwable ex) {
NestInstrumentationState state = parameters.getInstrumentationState();
String nowFieldPath = GraphqlPaths.getNowFieldPath(parameters.getExecutionStepInfo().getPath());
NestFutureTask
© 2015 - 2024 Weber Informatics LLC | Privacy Policy