pub struct MutationRoot { /* private fields */ }Expand description
GraphQL Mutation root. Delegates command dispatch to a
themql_core::MessageHandler via DispatchBridge.
Implementations§
Source§impl MutationRoot
impl MutationRoot
Sourcepub fn new(bridge: Arc<dyn DispatchBridge>) -> Self
pub fn new(bridge: Arc<dyn DispatchBridge>) -> Self
Construct a MutationRoot backed by the given dispatch bridge.
Trait Implementations§
Source§impl Clone for MutationRoot
impl Clone for MutationRoot
Source§fn clone(&self) -> MutationRoot
fn clone(&self) -> MutationRoot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ContainerType for MutationRoot
impl ContainerType for MutationRoot
Source§async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
Resolves a field value and outputs it as a json value
async_graphql::Value. Read moreSource§async fn find_entity(
&self,
ctx: &Context<'_>,
params: &Value,
) -> ServerResult<Option<Value>>
async fn find_entity( &self, ctx: &Context<'_>, params: &Value, ) -> ServerResult<Option<Value>>
Find the GraphQL entity with the given name from the parameter. Read more
Source§fn collect_all_fields<'a>(
&'a self,
ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>,
fields: &mut Fields<'a>,
) -> Result<(), ServerError>
fn collect_all_fields<'a>( &'a self, ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>, fields: &mut Fields<'a>, ) -> Result<(), ServerError>
Collect all the fields of the container that are queried in the
selection set. Read more
impl ObjectType for MutationRoot
Source§impl OutputType for MutationRoot
impl OutputType for MutationRoot
Source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
Source§async fn resolve(
&self,
ctx: &ContextSelectionSet<'_>,
_field: &Positioned<Field>,
) -> ServerResult<Value>
async fn resolve( &self, ctx: &ContextSelectionSet<'_>, _field: &Positioned<Field>, ) -> ServerResult<Value>
Resolve an output value to
async_graphql::Value.Source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
Auto Trait Implementations§
impl !RefUnwindSafe for MutationRoot
impl !UnwindSafe for MutationRoot
impl Freeze for MutationRoot
impl Send for MutationRoot
impl Sync for MutationRoot
impl Unpin for MutationRoot
impl UnsafeUnpin for MutationRoot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more