Struct async_graphql::types::EmptyMutation
source · pub struct EmptyMutation;
Expand description
Empty mutation
Only the parameters used to construct the Schema, representing an unconfigured mutation.
§Examples
use async_graphql::*;
struct Query;
#[Object]
impl Query {
async fn value(&self) -> i32 {
// A GraphQL Object type must define one or more fields.
100
}
}
let schema = Schema::new(Query, EmptyMutation, EmptySubscription);
Trait Implementations§
source§impl Clone for EmptyMutation
impl Clone for EmptyMutation
source§fn clone(&self) -> EmptyMutation
fn clone(&self) -> EmptyMutation
Returns a copy of the value. Read more
1.0.0 · 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 EmptyMutation
impl ContainerType for EmptyMutation
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§fn collect_all_fields<'a>(
&'a self,
ctx: &ContextSelectionSet<'a>,
fields: &mut Fields<'a>,
) -> ServerResult<()>
fn collect_all_fields<'a>( &'a self, ctx: &ContextSelectionSet<'a>, fields: &mut Fields<'a>, ) -> ServerResult<()>
Collect all the fields of the container that are queried in the
selection set. Read more
source§impl Default for EmptyMutation
impl Default for EmptyMutation
source§fn default() -> EmptyMutation
fn default() -> EmptyMutation
Returns the “default value” for a type. Read more
source§impl OutputType for EmptyMutation
impl OutputType for EmptyMutation
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.
impl Copy for EmptyMutation
impl ObjectType for EmptyMutation
Auto Trait Implementations§
impl Freeze for EmptyMutation
impl RefUnwindSafe for EmptyMutation
impl Send for EmptyMutation
impl Sync for EmptyMutation
impl Unpin for EmptyMutation
impl UnwindSafe for EmptyMutation
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)