Class AlternativeCallContext

java.lang.Object
graphql.execution.incremental.AlternativeCallContext

public class AlternativeCallContext extends Object
Contains data relevant to the execution of a DeferredFragmentCall and Subscription events.

The responsibilities of this class are similar to ExecutionContext, but restricted to the execution of a deferred call (instead of the whole GraphQL execution like ExecutionContext).

Some behaviours, like error capturing, need to be scoped to a single DeferredFragmentCall for deferred, because each defer payload contains its own distinct list of errors.

  • Constructor Details

    • AlternativeCallContext

      public AlternativeCallContext(int startLevel, int fields)
    • AlternativeCallContext

      public AlternativeCallContext()
  • Method Details

    • getStartLevel

      public int getStartLevel()
    • getFields

      public int getFields()
    • addErrors

      public void addErrors(List<GraphQLError> errors)
    • addError

      public void addError(GraphQLError graphqlError)
    • getErrors

      public List<GraphQLError> getErrors()
      Returns:
      a list of errors that were encountered while executing this deferred call