ExecutionContext

interface ExecutionContext

A context of GraphQL operation execution, represented as a set of Key keys and corresponding Element values.

It is inspired by the coroutines Context and allows to pass arbitrary data to interceptors.

Types

Companion
Link copied to clipboard
common
object Companion
Element
Link copied to clipboard
common
interface Element : ExecutionContext
An element of the ExecutionContext.
Key
Link copied to clipboard
common
interface Key<E : ExecutionContext.Element>
Key for the elements of ExecutionContext.

Functions

fold
Link copied to clipboard
common
abstract fun <R> fold(initial: R, operation: (R, ExecutionContext.Element) -> R): R
Accumulates entries of this context starting with initial value and applying operation from left to right to current accumulator value and each element of this context.
get
Link copied to clipboard
common
abstract operator fun <E : ExecutionContext.Element> get(key: ExecutionContext.Key<E>): E?
Returns the element with the given key from this context or null.
minusKey
Link copied to clipboard
common
abstract fun minusKey(key: ExecutionContext.Key<*>): ExecutionContext
Returns a context containing elements from this context, but without an element with the specified key.
plus
Link copied to clipboard
common
open operator fun plus(context: ExecutionContext): ExecutionContext
Returns a context containing elements from this context and elements from other context.

Inheritors

ExecutionContext
Link copied to clipboard