async-graphql/src/model/kind.rs

31 lines
877 B
Rust
Raw Normal View History

use crate::Enum;
2020-03-02 00:24:49 +00:00
/// An enum describing what kind of type a given `__Type` is.
#[derive(Enum, Copy, Clone, Eq, PartialEq)]
2020-10-14 09:08:57 +00:00
#[graphql(internal, name = "__TypeKind")]
2020-03-02 00:24:49 +00:00
pub enum __TypeKind {
/// Indicates this type is a scalar.
2020-03-09 12:00:57 +00:00
Scalar,
2020-03-02 00:24:49 +00:00
/// Indicates this type is an object. `fields` and `interfaces` are valid fields.
2020-03-09 12:00:57 +00:00
Object,
2020-03-02 00:24:49 +00:00
/// Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.
2020-03-09 12:00:57 +00:00
Interface,
2020-03-02 00:24:49 +00:00
/// Indicates this type is a union. `possibleTypes` is a valid field.
2020-03-09 12:00:57 +00:00
Union,
2020-03-02 00:24:49 +00:00
/// Indicates this type is an enum. `enumValues` is a valid field.
2020-03-09 12:00:57 +00:00
Enum,
2020-03-02 00:24:49 +00:00
/// Indicates this type is an input object. `inputFields` is a valid field.
2020-03-09 12:00:57 +00:00
InputObject,
2020-03-02 00:24:49 +00:00
/// Indicates this type is a list. `ofType` is a valid field.
2020-03-09 12:00:57 +00:00
List,
2020-03-02 00:24:49 +00:00
/// Indicates this type is a non-null. `ofType` is a valid field.
2020-03-09 12:00:57 +00:00
NonNull,
2020-03-02 00:24:49 +00:00
}