Class EmptyGraphQLContextFactory
-
- All Implemented Interfaces:
-
com.expediagroup.graphql.server.execution.GraphQLContextFactory
public final class EmptyGraphQLContextFactory implements GraphQLContextFactory<Context>Default context factory for HTTP requests: produces an empty GraphQLContext.
Since graphql-kotlin 6 the context is no longer a user-defined type implementing a marker interface, but graphql-java's map-like GraphQLContext. Implement your own factory and put values in the map keyed by class, then read them in a resolver through the
DataFetchingEnvironment.
-
-
Constructor Summary
Constructors Constructor Description EmptyGraphQLContextFactory()
-
Method Summary
Modifier and Type Method Description GraphQLContextgenerateContext(Context request)-
-
Method Detail
-
generateContext
GraphQLContext generateContext(Context request)
-
-
-
-