Trait async_graphql::Type [−][src]
pub trait Type {
fn type_name() -> Cow<'static, str>;
fn create_type_info(registry: &mut Registry) -> String;
fn qualified_type_name() -> String { ... }
fn introspection_type_name(&self) -> Cow<'static, str> { ... }
}
Expand description
Represents a GraphQL type.
All GraphQL types implement this trait, such as Scalar
, Object
, Union
…
Required methods
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.
Provided methods
fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
fn introspection_type_name(&self) -> Cow<'static, str>
fn introspection_type_name(&self) -> Cow<'static, str>
Introspection type name
Is the return value of field __typename
, the interface and union should return the current type, and the others return Type::type_name
.