org.rapidgraphql.schemabuilder.RapidGraphQLContextBuilder Maven / Gradle / Ivy
package org.rapidgraphql.schemabuilder;
import graphql.kickstart.execution.context.DefaultGraphQLContextBuilder;
import graphql.kickstart.execution.context.GraphQLKickstartContext;
import graphql.kickstart.servlet.context.GraphQLServletContextBuilder;
import org.dataloader.DataLoaderRegistry;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.websocket.Session;
import jakarta.websocket.server.HandshakeRequest;
import java.util.HashMap;
import java.util.Map;
public class RapidGraphQLContextBuilder extends DefaultGraphQLContextBuilder
implements GraphQLServletContextBuilder {
private final DataLoaderRegistryFactory dataLoaderRegistryFactory;
public RapidGraphQLContextBuilder(DataLoaderRegistryFactory dataLoaderRegistryFactory) {
this.dataLoaderRegistryFactory = dataLoaderRegistryFactory;
}
@Override
public GraphQLKickstartContext build(HttpServletRequest request, HttpServletResponse response) {
Map