Struct juniper::executor::Executor[][src]

pub struct Executor<'r, 'a, CtxT, S = DefaultScalarValue> where
    CtxT: 'a,
    S: 'a, 
{ /* fields omitted */ }
Expand description

Query execution engine

The executor helps drive the query execution in a schema. It keeps track of the current field stack, context, variables, and errors.

Implementations

Resolve a single arbitrary value into a stream of Values. If a field fails to resolve, pushes error to Executor and returns Value::Null.

Resolve a single arbitrary value into a stream of Values. Calls resolve_into_stream on T.

Resolve a single arbitrary value, mapping the context to a new type

Resolve a single arbitrary value into an ExecutionResult

Resolve a single arbitrary value into an ExecutionResult

Resolve a single arbitrary value, mapping the context to a new type

Resolve a single arbitrary value into a return value

If the field fails to resolve, null will be returned.

Resolve a single arbitrary value into a return value

If the field fails to resolve, null will be returned.

Derive a new executor by replacing the context

This can be used to connect different types, e.g. from different Rust libraries, that require different context types.

Access the current context

You usually provide the context when calling the top-level execute function, or using the context factory in the Iron integration.

The currently executing schema

The current location of the executor

Add an error to the execution engine at the current executor location

Add an error to the execution engine at a specific location

Returns new ExecutionError at current location

Construct a lookahead selection for the current selection.

This allows seeing the whole selection and perform operations affecting the children.

Create new OwnedExecutor and clone all current data (except for errors) there

New empty vector is created for errors because existing errors won’t be needed to be accessed by user in OwnedExecutor as existing errors will be returned in execute_query/execute_mutation/resolve_into_stream/etc.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.