Package net.morimekta.providence.graphql
Interface GQLContextFactory<Context extends GQLContext>
-
- Type Parameters:
Context
- The context implementation type.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface GQLContextFactory<Context extends GQLContext>
Create a context instance to be used in the graphql servlet.
-
-
Field Summary
Fields Modifier and Type Field Description static GQLContextFactory
DEFAULT_INSTANCE
Default instance to be used when no special context is needed.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Context
createContext(javax.servlet.http.HttpServletRequest request, GQLOperation operation)
Create a context for the given HTTP request and GQL operation.
-
-
-
Field Detail
-
DEFAULT_INSTANCE
static final GQLContextFactory DEFAULT_INSTANCE
Default instance to be used when no special context is needed. The default instance makes the HTTP request and the GQL operation available on processor instantiation.
-
-
Method Detail
-
createContext
Context createContext(@Nonnull javax.servlet.http.HttpServletRequest request, @Nonnull GQLOperation operation)
Create a context for the given HTTP request and GQL operation.- Parameters:
request
- The HTTP request.operation
- The GQL operation.- Returns:
- The context instance.
-
-