Context

sangria.schema.Context
case class Context[Ctx, Val](value: Val, ctx: Ctx, args: Args, schema: Schema[Ctx, Val], field: Field[Ctx, Val], parentType: ObjectType[Ctx, Any], marshaller: ResultMarshaller, query: Document, sourceMapper: Option[SourceMapper], deprecationTracker: Option[DeprecationTracker], astFields: Vector[Field], path: ExecutionPath, deferredResolverState: Any, middlewareAttachments: Vector[MiddlewareAttachment]) extends WithArguments, WithInputTypeRendering[Ctx]

The context of a field during schema resolution.

When a GraphQL request is executed by a Sangria server, each field in the request is resolved to determine the data that should be returned. An instance of this class provides the context for a particular field's resolution.

Type parameters

Ctx

Type of the context object that was passed to Sangria's execution method.

Val

Type of the object to which the field belongs.

Value parameters

ctx

The context object that was passed to Sangria's execution method.

value

The object to which the field belongs.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def arg[T](name: String): T

Attributes

Inherited from:
WithArguments
def arg[T](arg: Argument[T]): T

Attributes

Inherited from:
WithArguments

Attributes

Inherited from:
WithArguments

Attributes

Inherited from:
WithArguments
def argOpt[T](arg: Argument[T]): Option[T]

Attributes

Inherited from:
WithArguments
def argOpt[T](name: String): Option[T]

Attributes

Inherited from:
WithArguments

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
def renderInputValueCompact[T](value: (, ToInput[_, _]), tpe: InputType[T]): Option[String]

Attributes

Inherited from:
WithInputTypeRendering
def withArgs[A1, A2, A3, A4, A5, A6, A7, A8, R](arg1: Argument[A1], arg2: Argument[A2], arg3: Argument[A3], arg4: Argument[A4], arg5: Argument[A5], arg6: Argument[A6], arg7: Argument[A7], arg8: Argument[A8])(fn: (A1, A2, A3, A4, A5, A6, A7, A8) => R): R

Attributes

Inherited from:
WithArguments
def withArgs[A1, A2, A3, A4, A5, A6, A7, R](arg1: Argument[A1], arg2: Argument[A2], arg3: Argument[A3], arg4: Argument[A4], arg5: Argument[A5], arg6: Argument[A6], arg7: Argument[A7])(fn: (A1, A2, A3, A4, A5, A6, A7) => R): R

Attributes

Inherited from:
WithArguments
def withArgs[A1, A2, A3, A4, A5, A6, R](arg1: Argument[A1], arg2: Argument[A2], arg3: Argument[A3], arg4: Argument[A4], arg5: Argument[A5], arg6: Argument[A6])(fn: (A1, A2, A3, A4, A5, A6) => R): R

Attributes

Inherited from:
WithArguments
def withArgs[A1, A2, A3, A4, A5, R](arg1: Argument[A1], arg2: Argument[A2], arg3: Argument[A3], arg4: Argument[A4], arg5: Argument[A5])(fn: (A1, A2, A3, A4, A5) => R): R

Attributes

Inherited from:
WithArguments
def withArgs[A1, A2, A3, A4, R](arg1: Argument[A1], arg2: Argument[A2], arg3: Argument[A3], arg4: Argument[A4])(fn: (A1, A2, A3, A4) => R): R

Attributes

Inherited from:
WithArguments
def withArgs[A1, A2, A3, R](arg1: Argument[A1], arg2: Argument[A2], arg3: Argument[A3])(fn: (A1, A2, A3) => R): R

Attributes

Inherited from:
WithArguments
def withArgs[A1, A2, R](arg1: Argument[A1], arg2: Argument[A2])(fn: (A1, A2) => R): R

Attributes

Inherited from:
WithArguments
def withArgs[A1, R](arg1: Argument[A1])(fn: A1 => R): R

Attributes

Inherited from:
WithArguments