--- source: cynic-codegen/tests/use-schema.rs expression: "format_code(format!(\"{}\", tokens))" snapshot_kind: text --- impl cynic::schema::QueryRoot for QueryRoot {} impl cynic::schema::MutationRoot for MutationRoot {} impl cynic::schema::SubscriptionRoot for SubscriptionRoot {} pub struct Book; pub struct BookChanged; pub struct MutationRoot; pub struct MutationType {} pub struct QueryRoot; pub struct SubscriptionRoot; impl cynic::schema::NamedType for Book { const NAME: &'static ::core::primitive::str = "Book"; } impl cynic::schema::NamedType for BookChanged { const NAME: &'static ::core::primitive::str = "BookChanged"; } impl cynic::schema::NamedType for MutationRoot { const NAME: &'static ::core::primitive::str = "MutationRoot"; } impl cynic::schema::NamedType for QueryRoot { const NAME: &'static ::core::primitive::str = "QueryRoot"; } impl cynic::schema::NamedType for SubscriptionRoot { const NAME: &'static ::core::primitive::str = "SubscriptionRoot"; } #[allow(non_snake_case, non_camel_case_types)] pub mod __fields { pub mod Book { pub struct id; impl cynic::schema::Field for id { type Type = super::super::String; const NAME: &'static ::core::primitive::str = "id"; } impl cynic::schema::HasField for super::super::Book { type Type = super::super::String; } pub struct name; impl cynic::schema::Field for name { type Type = super::super::String; const NAME: &'static ::core::primitive::str = "name"; } impl cynic::schema::HasField for super::super::Book { type Type = super::super::String; } pub struct author; impl cynic::schema::Field for author { type Type = super::super::String; const NAME: &'static ::core::primitive::str = "author"; } impl cynic::schema::HasField for super::super::Book { type Type = super::super::String; } pub struct __typename; impl cynic::schema::Field for __typename { type Type = super::super::String; const NAME: &'static ::core::primitive::str = "__typename"; } impl cynic::schema::HasField<__typename> for super::super::Book { type Type = super::super::String; } } pub mod BookChanged { pub struct mutationType; impl cynic::schema::Field for mutationType { type Type = super::super::MutationType; const NAME: &'static ::core::primitive::str = "mutationType"; } impl cynic::schema::HasField for super::super::BookChanged { type Type = super::super::MutationType; } pub struct id; impl cynic::schema::Field for id { type Type = super::super::ID; const NAME: &'static ::core::primitive::str = "id"; } impl cynic::schema::HasField for super::super::BookChanged { type Type = super::super::ID; } pub struct book; impl cynic::schema::Field for book { type Type = Option; const NAME: &'static ::core::primitive::str = "book"; } impl cynic::schema::HasField for super::super::BookChanged { type Type = Option; } pub struct __typename; impl cynic::schema::Field for __typename { type Type = super::super::String; const NAME: &'static ::core::primitive::str = "__typename"; } impl cynic::schema::HasField<__typename> for super::super::BookChanged { type Type = super::super::String; } } pub mod MutationRoot { pub struct createBook; impl cynic::schema::Field for createBook { type Type = super::super::ID; const NAME: &'static ::core::primitive::str = "createBook"; } impl cynic::schema::HasField for super::super::MutationRoot { type Type = super::super::ID; } pub mod _create_book_arguments { pub struct name; impl cynic::schema::HasArgument for super::createBook { type ArgumentType = super::super::super::String; const NAME: &'static ::core::primitive::str = "name"; } pub struct author; impl cynic::schema::HasArgument for super::createBook { type ArgumentType = super::super::super::String; const NAME: &'static ::core::primitive::str = "author"; } } pub struct deleteBook; impl cynic::schema::Field for deleteBook { type Type = super::super::Boolean; const NAME: &'static ::core::primitive::str = "deleteBook"; } impl cynic::schema::HasField for super::super::MutationRoot { type Type = super::super::Boolean; } pub mod _delete_book_arguments { pub struct id; impl cynic::schema::HasArgument for super::deleteBook { type ArgumentType = super::super::super::ID; const NAME: &'static ::core::primitive::str = "id"; } } pub struct __typename; impl cynic::schema::Field for __typename { type Type = super::super::String; const NAME: &'static ::core::primitive::str = "__typename"; } impl cynic::schema::HasField<__typename> for super::super::MutationRoot { type Type = super::super::String; } } pub mod QueryRoot { pub struct books; impl cynic::schema::Field for books { type Type = Vec; const NAME: &'static ::core::primitive::str = "books"; } impl cynic::schema::HasField for super::super::QueryRoot { type Type = Vec; } pub struct __typename; impl cynic::schema::Field for __typename { type Type = super::super::String; const NAME: &'static ::core::primitive::str = "__typename"; } impl cynic::schema::HasField<__typename> for super::super::QueryRoot { type Type = super::super::String; } } pub mod SubscriptionRoot { pub struct interval; impl cynic::schema::Field for interval { type Type = super::super::Int; const NAME: &'static ::core::primitive::str = "interval"; } impl cynic::schema::HasField for super::super::SubscriptionRoot { type Type = super::super::Int; } pub mod _interval_arguments { pub struct n; impl cynic::schema::HasArgument for super::interval { type ArgumentType = super::super::super::Int; const NAME: &'static ::core::primitive::str = "n"; } } pub struct books; impl cynic::schema::Field for books { type Type = super::super::BookChanged; const NAME: &'static ::core::primitive::str = "books"; } impl cynic::schema::HasField for super::super::SubscriptionRoot { type Type = super::super::BookChanged; } pub mod _books_arguments { pub struct mutationType; impl cynic::schema::HasArgument for super::books { type ArgumentType = Option; const NAME: &'static ::core::primitive::str = "mutationType"; } } pub struct __typename; impl cynic::schema::Field for __typename { type Type = super::super::String; const NAME: &'static ::core::primitive::str = "__typename"; } impl cynic::schema::HasField<__typename> for super::super::SubscriptionRoot { type Type = super::super::String; } } } pub type Boolean = bool; pub type String = std::string::String; pub type Float = f64; pub type Int = i32; pub type ID = cynic::Id; pub mod variable { use cynic::variables::VariableType; #[doc = r" Used to determine the type of a given variable that"] #[doc = r" appears in an argument struct."] pub trait Variable { const TYPE: VariableType; } impl Variable for &T where T: ?::core::marker::Sized + Variable, { const TYPE: VariableType = T::TYPE; } impl Variable for Option where T: Variable, { const TYPE: VariableType = VariableType::Nullable(&T::TYPE); } impl Variable for [T] where T: Variable, { const TYPE: VariableType = VariableType::List(&T::TYPE); } impl Variable for Vec where T: Variable, { const TYPE: VariableType = VariableType::List(&T::TYPE); } impl Variable for Box where T: Variable, { const TYPE: VariableType = T::TYPE; } impl Variable for std::rc::Rc where T: Variable, { const TYPE: VariableType = T::TYPE; } impl Variable for std::sync::Arc where T: Variable, { const TYPE: VariableType = T::TYPE; } impl Variable for std::borrow::Cow<'_, T> where T: ?::core::marker::Sized + Variable + ToOwned, { const TYPE: VariableType = T::TYPE; } impl Variable for bool { const TYPE: VariableType = VariableType::Named("Boolean"); } impl Variable for str { const TYPE: VariableType = VariableType::Named("String"); } impl Variable for String { const TYPE: VariableType = ::TYPE; } impl Variable for f64 { const TYPE: VariableType = VariableType::Named("Float"); } impl Variable for i32 { const TYPE: VariableType = VariableType::Named("Int"); } impl Variable for cynic::Id { const TYPE: VariableType = VariableType::Named("ID"); } }