Package graphql

Class TypeResolutionEnvironment

    • Method Detail

      • getObject

        public <T> T getObject()
        You will be passed the specific source object that needs to be resolved into a concrete graphql object type
        Type Parameters:
        T - you decide what type it is
        Returns:
        the object that needs to be resolved into a specific graphql object type
      • getArguments

        public java.util.Map<java.lang.String,​java.lang.Object> getArguments()
        Returns:
        the runtime arguments to this the graphql field
      • getField

        public MergedField getField()
        Returns:
        the graphql field in question
      • getSchema

        public GraphQLSchema getSchema()
        Returns:
        the graphql schema in question
      • getContext

        @Deprecated(since="2021-12-27")
        public <T> T getContext()
        Deprecated.
        Returns the context object set in via ExecutionInput.getContext()
        Type Parameters:
        T - the type to cast the result to
        Returns:
        the context object
      • getLocalContext

        public <T> T getLocalContext()
        Returns the local context object set in via DataFetcherResult.getLocalContext()
        Type Parameters:
        T - the type to cast the result to
        Returns:
        the local context object