--- source: cynic-querygen/tests/github-tests.rs expression: "document_to_fragment_structs(query, schema,\n &QueryGenOptions::default()).expect(\"QueryGen Failed\")" --- #[derive(cynic::QueryVariables, Debug)] pub struct IssueOrPRVariables { pub assignee_count: i32, } #[derive(cynic::QueryFragment, Debug)] #[cynic(graphql_type = "Query", variables = "IssueOrPRVariables")] pub struct IssueOrPR { #[arguments(owner: "obmarg", name: "cynic")] pub repository: Option, } #[derive(cynic::QueryFragment, Debug)] #[cynic(variables = "IssueOrPRVariables")] pub struct Repository { #[arguments(number: 1)] pub issue_or_pull_request: Option, } #[derive(cynic::QueryFragment, Debug)] #[cynic(variables = "IssueOrPRVariables")] pub struct PullRequest { pub id: cynic::Id, pub title: String, #[arguments(first: $assignee_count)] pub assignees: UserConnection, } #[derive(cynic::QueryFragment, Debug)] #[cynic(variables = "IssueOrPRVariables")] pub struct Issue { pub id: cynic::Id, pub title: String, #[arguments(first: $assignee_count)] pub assignees: UserConnection, } #[derive(cynic::QueryFragment, Debug)] pub struct UserConnection { pub total_count: i32, } #[derive(cynic::InlineFragments, Debug)] #[cynic(variables = "IssueOrPRVariables")] pub enum IssueOrPullRequest { Issue(Issue), PullRequest(PullRequest), #[cynic(fallback)] Unknown }