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

graphql.spring.web.servlet.components.DefaultExecutionResultHandler Maven / Gradle / Ivy

package graphql.spring.web.servlet.components;

import com.fasterxml.jackson.databind.ObjectMapper;
import graphql.ExecutionResult;
import graphql.Internal;
import graphql.spring.web.servlet.ExecutionResultHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.concurrent.CompletableFuture;

@Component
@Internal
public class DefaultExecutionResultHandler implements ExecutionResultHandler {

    @Autowired
    ObjectMapper objectMapper;

    @Override
    public Object handleExecutionResult(CompletableFuture executionResultCF) {
        return executionResultCF.thenApply(ExecutionResult::toSpecification);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy