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) -> StringCreate type information in the registry and return qualified typename.
Provided methods
fn qualified_type_name() -> String
fn qualified_type_name() -> StringQualified 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.
Implementations on Foreign Types
Implementors
impl<C, T, EC, EE> Type for Connection<C, T, EC, EE> where
C: CursorType,
T: OutputType,
EC: ObjectType,
EE: ObjectType, impl<T: Num + Display + Send + Sync> Type for StringNumber<T> where
<T as Num>::FromStrRadixErr: Display,