[][src]Derive Macro async_graphql::GQLSimpleObject

#[derive(GQLSimpleObject)]
{
    // Attributes available to this derive:
    #[field]
    #[graphql]
}

Derive a GraphQL object with fields

You can also use an attribute.

See also the Book.

Examples

use async_graphql::*;
#[derive(GQLSimpleObject)]
#[graphql(name = "MyObj1")]
struct MyObj {
    value: i32,
}