Khan / genqlient

a truly type-safe Go GraphQL client
MIT License
1.02k stars 99 forks source link

disable input validation when `use_struct_references` is enabled #344

Closed Fazt01 closed 5 days ago

Fazt01 commented 6 days 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 5 days ago

Great, thanks!