Khan / genqlient

a truly type-safe Go GraphQL client
MIT License
1.09k stars 113 forks source link

disable input validation when `use_struct_references` is enabled #344

Closed Fazt01 closed 4 months ago

Fazt01 commented 5 months ago

Fix for https://github.com/Khan/genqlient/issues/342. As use_struct_references is incompatible with omitempty and pointer validation, the most simple change is to disable the validation when the use_struct_references is enabled. Note this implementation disables the validation even for types that are not influenced by use_struct_references, but still better than disabling the validation globally.

I have:

benjaminjkraft commented 4 months ago

Great, thanks!