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

graphql.servlet.BatchExecutionHandler Maven / Gradle / Ivy

There is a newer version: 16.0.0
Show newest version
package graphql.servlet;

import graphql.ExecutionInput;
import graphql.ExecutionResult;

import javax.servlet.http.HttpServletResponse;
import java.io.Writer;
import java.util.function.BiFunction;

/**
 * @author Andrew Potter
 */
public interface BatchExecutionHandler {

    /**
     * Allows separating the logic of handling batch queries from how each individual query is resolved.
     * @param batchedInvocationInput the batch query input
     * @param queryFunction Function to produce query results.
     * @param graphQLObjectMapper object mapper used to serialize results
     * @param response http response object
     */
    void handleBatch(GraphQLBatchedInvocationInput batchedInvocationInput, HttpServletResponse response, GraphQLObjectMapper graphQLObjectMapper,
                     BiFunction queryFunction);
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy