--- source: cynic-querygen/tests/misc-tests.rs expression: "document_to_fragment_structs(query, schema,\n &QueryGenOptions::default()).expect(\"QueryGen Failed\")" --- #[derive(cynic::QueryFragment, Debug)] #[cynic(graphql_type = "SubscriptionRoot")] pub struct BookSubscription { #[arguments(mutationType: "CREATED")] pub books: BookChanged, } #[derive(cynic::QueryFragment, Debug)] pub struct BookChanged { pub mutation_type: MutationType, pub id: cynic::Id, pub book: Option, } #[derive(cynic::QueryFragment, Debug)] pub struct Book { pub id: String, pub name: String, pub author: String, } #[derive(cynic::Enum, Clone, Copy, Debug)] pub enum MutationType { Created, Deleted, }