I'd imagine any decent library would provide an escape hatch around the codegen, so you can specify your own types if you'd like.
The other option is to only write the Go types, then use codegen to generate the GraphQL schemas. In a way, I prefer this because it keeps everything in the same language, using all of the great tooling Go has.
There is some prior art for this; the Juniper [1] Rust library.
The other option is to only write the Go types, then use codegen to generate the GraphQL schemas. In a way, I prefer this because it keeps everything in the same language, using all of the great tooling Go has.
There is some prior art for this; the Juniper [1] Rust library.
[1] https://github.com/graphql-rust/juniper