Khan / genqlient

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

Optional input with required output #331

Closed ido-perez closed 2 months ago

ido-perez commented 3 months ago

Is your feature request related to a problem? Please describe. I want to generate the query input as optional (pointer: true) but the query response as required.

For example:

query getExample($where: inputExample) {
  example(where: $where) {
    response
  }
}

The result will be: inputExample fields will be optional (pointer: true) response fields will be required

benjaminjkraft commented 2 months ago

There's a bunch of documentation about nullable fields! https://github.com/Khan/genqlient/blob/main/docs/operations.md#nullable-fields If you have a specific suggestion or request for something that doesn't exist, you'll need to be more specific about why none of the current options work for you.