Generate multiple graphs with shared resolvers for common types #3714
Replies: 1 comment 1 reply
-
|
Hey, your question has several possible answers, so it's challenging to provide a specific answer. There was some discussion about this in #3631 and documentation added specifically https://gqlgen.com/config/#configuring-for-a-big-projects There's also a discussion about avoiding writing converters: #3086 Note If the structs have identical fields, you can use Go's built-in struct conversion. To convert between mostly identical structs, you can use https://github.com/jmattheis/goverter , https://github.com/go-viper/mapstructure or a few other libraries. However, I'm not sure that entirely answers your question. Can you point out some specific pain points that are still missing? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am working on a project where I have a lot of overlap between two graphs in terms of types and resolvers but want them as two distinct graphs with overrides in each graph for things that are specific to that one. What would be the best way to structure this?
gqlgen.ymlfiles and running generate multiple times with the resolver files that are shared ending up in the same file but they ended up conflicting in some ways.Any suggestions on how to set this up? Or maybe suggestions on alternative setups that I should look into?
Thanks so much
Beta Was this translation helpful? Give feedback.
All reactions