byme8 / ZeroQL

C# GraphQL client with Linq-like syntax
MIT License
278 stars 13 forks source link

Optional flag to be able to disable CS8618 warnings in generated client #13

Closed DaveRMaltby closed 2 years ago

DaveRMaltby commented 2 years ago

Since I regenerate the client code with each compile of my automation tests, it would be helpful, if there was a flag that would automatically add: #prama warning disable CS8618 and #pragma warning restore CS8618 to the beginning and end of the generated client file.

To avoid this, I currently have my own console application that directly calls GraphQLGenerator.ToCSharp() and I prepend and append the pragma statements myself. Thanks.

DaveRMaltby commented 2 years ago

By the way, I'm happy to contribute a PR if you like.

byme8 commented 2 years ago

Checkout v2.1.1. I disabled warnings in the file. Looks like Rider doesn't report these warnings inside generated files. That's why I missed them.

By the way, I'm happy to contribute a PR if you like.

Go ahead! You are welcome