[−][src]Struct juniper::Executor
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, S> Executor<'a, CtxT, S> where
S: ScalarValue,
&'b S: ScalarRefValue<'b>,
[src]
S: ScalarValue,
&'b S: ScalarRefValue<'b>,
pub fn resolve_with_ctx<NewCtxT, T>(
&self,
info: &T::TypeInfo,
value: &T
) -> ExecutionResult<S> where
NewCtxT: FromContext<CtxT>,
T: GraphQLType<S, Context = NewCtxT>,
[src]
&self,
info: &T::TypeInfo,
value: &T
) -> ExecutionResult<S> where
NewCtxT: FromContext<CtxT>,
T: GraphQLType<S, Context = NewCtxT>,
Resolve a single arbitrary value, mapping the context to a new type
pub fn resolve<T>(&self, info: &T::TypeInfo, value: &T) -> ExecutionResult<S> where
T: GraphQLType<S, Context = CtxT>,
[src]
T: GraphQLType<S, Context = CtxT>,
Resolve a single arbitrary value into an ExecutionResult
pub fn resolve_into_value<T>(&self, info: &T::TypeInfo, value: &T) -> Value<S> where
T: GraphQLType<S, Context = CtxT>,
[src]
T: GraphQLType<S, Context = CtxT>,
Resolve a single arbitrary value into a return value
If the field fails to resolve, null
will be returned.
pub fn replaced_context<'b, NewCtxT>(
&'b self,
ctx: &'b NewCtxT
) -> Executor<'b, NewCtxT, S>
[src]
&'b self,
ctx: &'b NewCtxT
) -> Executor<'b, NewCtxT, S>
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.
pub 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.
pub fn schema(&self) -> &'a SchemaType<S>
[src]
The currently executing schema
pub fn location(&self) -> &SourcePosition
[src]
The current location of the executor
pub fn push_error(&self, error: FieldError<S>)
[src]
Add an error to the execution engine at the current executor location
pub fn push_error_at(&self, error: FieldError<S>, location: SourcePosition)
[src]
Add an error to the execution engine at a specific location
pub fn look_ahead(&'a self) -> LookAheadSelection<'a, S>
[src]
Construct a lookahead selection for the current selection
This allows to see the whole selection and preform operations affecting the childs
Auto Trait Implementations
impl<'a, CtxT, S> Send for Executor<'a, CtxT, S> where
CtxT: Sync,
S: Send + Sync,
CtxT: Sync,
S: Send + Sync,
impl<'a, CtxT, S> Sync for Executor<'a, CtxT, S> where
CtxT: Sync,
S: Send + Sync,
CtxT: Sync,
S: Send + Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,