Class GraphQLContextExtensionsKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static <T extends Any> T get(GraphQLContext $self) Returns a value in the context by KClass key
      final static <T extends Any> T getOrDefault(GraphQLContext $self, T defaultValue) Returns a value in the context by KClass key
      final static <T extends Any> T getOrElse(GraphQLContext $self, Function0<T> defaultValue) Returns a value in the context by KClass key
      final static <T extends Any> T getOrThrow(GraphQLContext $self) Returns a value in the context by KClass key or KeyNotFoundInGraphQLContextException if key was not found
      final static GraphQLContext plus(GraphQLContext $self, GraphQLContext graphQLContext) Puts all the values of graphQLContext into this GraphQLContext
      final static GraphQLContext plus(GraphQLContext $self, Map<?, Object> map) Puts all the values of map into this GraphQLContext
      final static GraphQLContext toGraphQLContext(Map<?, Object> $self) Create a GraphQLContext from this map
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • get

         final static <T extends Any> T get(GraphQLContext $self)

        Returns a value in the context by KClass key

      • getOrDefault

         final static <T extends Any> T getOrDefault(GraphQLContext $self, T defaultValue)

        Returns a value in the context by KClass key

        Parameters:
        defaultValue - the default value to use if there is no KClass key entry
      • getOrElse

         final static <T extends Any> T getOrElse(GraphQLContext $self, Function0<T> defaultValue)

        Returns a value in the context by KClass key

        Parameters:
        defaultValue - function to invoke if there is no KClass key entry
      • plus

         final static GraphQLContext plus(GraphQLContext $self, GraphQLContext graphQLContext)

        Puts all the values of graphQLContext into this GraphQLContext

        Parameters:
        graphQLContext - which values will be added into this GraphQLContext
      • plus

         final static GraphQLContext plus(GraphQLContext $self, Map<?, Object> map)

        Puts all the values of map into this GraphQLContext

        Parameters:
        map - which values will be added into this GraphQLContext