Class: Context

Isolated

The GraphQL context object used to pass the meta information between resolvers.

Methods

set

Sets a given value for a given key in the GraphQL context.

get

Retrieves a value using the given key from the GraphQL context.

remove

Removes a value using the given key from the GraphQL context.

set

function set(string 'key, Cloneable | isolated object {}  value)
Isolated Function

Sets a given value for a given key in the GraphQL context.

Parameters

  • value Cloneable | isolated object {}
  • Value to be set

get

function get(string 'key) returns Cloneable | isolated object {} | Error
Isolated Function

Retrieves a value using the given key from the GraphQL context.

Parameters

Return Type

(Cloneable | isolated object {} | Error)

The value if the key is present in the context, a graphql:Error otherwise

remove

function remove(string 'key) returns Cloneable | isolated object {} | Error
Isolated Function

Removes a value using the given key from the GraphQL context.

Parameters

Return Type

(Cloneable | isolated object {} | Error)

The value if the key is present in the context, a graphql:Error otherwise