CLI whole query file is inserted in generated query field
bonega opened this issue · 1 comments
bonega commented
When generating from a single query-file that contains multiple mutations I get:
pub mod op_a {
pub const QUERY : & str = "mutation op_a\n mutation op_b\n"
...
}When sending a graphql request, the response will complain about fields that are present in op_b.
If I manually remove op_b from the QUERY field it works.
Thanks for any help.
kontrol-apa commented
Run into the same issue today. I have 3 separate queries in a query file and the generated code had the same QUERY field ( pub const QUERY : & str = "query LargestSales($limit: Int!, $contract: String!) {\n sales ... ) for all 3 queries. Manually removing the unrelated parts did the job.