3 ms·
Interesting. I'm curious how code generation is/was used to work around the language not having having support for generics? Or was this something specific to G
by bogomipz 5y ago
Interesting. I'm curious how code generation is/was used to work around the language not having having support for generics? Or was this something specific to Graphql?
- scheme271 5y agoThe kubernetes api (more specifically the k8s apimachinery) code uses codegen in order to create code so that you can convert custom CRDs to go structures rather than working with json. It's one of the more opaque bits of writing go code that works with k8s.
- akmittal 5y agogqlgen is most popular for graphql and uses codegen. It seem to be good but It felt not that easy to use coming from node world(apollo-server). There were bunch of libraries which helped with code generation to work around generics. I don't think it was specific to Graphql. https://github.com/cheekybits/genny https://github.com/cheekybits/genny is one I have seen.