Khan / genqlient

a truly type-safe Go GraphQL client
MIT License
1.07k stars 107 forks source link

Automatically generate all fields from type from query or mutation #233

Closed droslean closed 1 year ago

droslean commented 1 year ago

Example:

mutation AddPerson($input: [AddPersonInput!]!, $upsert: Boolean) {
    addPerson(input: $input, upsert: $upsert) {
        person {
           // Can I tell the generator to add all fields of Person here?
        }
        numUids
    }
}

cc @benjaminjkraft

benjaminjkraft commented 1 year ago

We don't support this now, but I actually already did have an issue for it! If you could add a bit more about your use case to #27 -- I'm not sure if it's a good idea yet.