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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      GraphQLContext generateContext(Context request)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EmptyGraphQLContextFactory

        EmptyGraphQLContextFactory()