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

source§

fn clone(&self) -> EmptyMutation

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl ContainerType for EmptyMutation

source§

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 more
source§

fn collect_all_fields<'a>( &'a self, ctx: &ContextSelectionSet<'a>, fields: &mut Fields<'a>, ) -> ServerResult<()>
where Self: Send + Sync,

Collect all the fields of the container that are queried in the selection set. Read more
source§

fn find_entity( &self, _: &Context<'_>, _params: &Value, ) -> impl Future<Output = ServerResult<Option<Value>>> + Send

Find the GraphQL entity with the given name from the parameter. Read more
source§

impl Default for EmptyMutation

source§

fn default() -> EmptyMutation

Returns the “default value” for a type. Read more
source§

impl OutputType for EmptyMutation

source§

fn type_name() -> Cow<'static, str>

Type the name.
source§

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>

Resolve an output value to async_graphql::Value.
source§

fn qualified_type_name() -> String

Qualified typename.
source§

fn introspection_type_name(&self) -> Cow<'static, str>

Introspection type name Read more
source§

impl Copy for EmptyMutation

source§

impl ObjectType for EmptyMutation

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.