Struct juniper::Executor
[−]
[src]
pub struct Executor<'a, CtxT> where
CtxT: 'a, { /* fields omitted */ }
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.
Methods
impl<'a, CtxT> Executor<'a, CtxT>
[src]
fn resolve_with_ctx<NewCtxT, T: GraphQLType<Context = NewCtxT>>(
&self,
info: &T::TypeInfo,
value: &T
) -> ExecutionResult where
NewCtxT: FromContext<CtxT>,
[src]
&self,
info: &T::TypeInfo,
value: &T
) -> ExecutionResult where
NewCtxT: FromContext<CtxT>,
Resolve a single arbitrary value, mapping the context to a new type
fn resolve<T: GraphQLType<Context = CtxT>>(
&self,
info: &T::TypeInfo,
value: &T
) -> ExecutionResult
[src]
&self,
info: &T::TypeInfo,
value: &T
) -> ExecutionResult
Resolve a single arbitrary value into an ExecutionResult
fn resolve_into_value<T: GraphQLType<Context = CtxT>>(
&self,
info: &T::TypeInfo,
value: &T
) -> Value
[src]
&self,
info: &T::TypeInfo,
value: &T
) -> Value
Resolve a single arbitrary value into a return value
If the field fails to resolve, null
will be returned.
fn replaced_context<'b, NewCtxT>(
&'b self,
ctx: &'b NewCtxT
) -> Executor<'b, NewCtxT>
[src]
&'b self,
ctx: &'b NewCtxT
) -> Executor<'b, NewCtxT>
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.
fn context(&self) -> &'a CtxT
[src]
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.
fn schema(&self) -> &'a SchemaType
[src]
The currently executing schema
fn location(&self) -> &SourcePosition
[src]
The current location of the executor
fn push_error(&self, error: FieldError)
[src]
Add an error to the execution engine at the current executor location
fn push_error_at(&self, error: FieldError, location: SourcePosition)
[src]
Add an error to the execution engine at a specific location