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

graphql.kickstart.execution.context.GraphQLKickstartContext Maven / Gradle / Ivy

The newest version!
package graphql.kickstart.execution.context;

import java.util.Map;
import lombok.NonNull;
import org.dataloader.DataLoaderRegistry;

/** Represents the context required by the servlet to execute a GraphQL request. */
public interface GraphQLKickstartContext {

  static GraphQLKickstartContext of(Map map) {
    return new DefaultGraphQLContext(map);
  }

  static GraphQLKickstartContext of(DataLoaderRegistry dataLoaderRegistry) {
    return new DefaultGraphQLContext(dataLoaderRegistry);
  }

  static GraphQLKickstartContext of(
      DataLoaderRegistry dataLoaderRegistry, Map map) {
    return new DefaultGraphQLContext(dataLoaderRegistry, map);
  }

  /** @return the Dataloader registry to use for the execution. Must not return null */
  @NonNull
  DataLoaderRegistry getDataLoaderRegistry();

  Map getMapOfContext();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy