Generate base struct from GraphQL interface to embed in type-based structs #3240
adrianlungu
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Not sure if this is possible or I just missed it, but it would be great to be able to generate structs from the GraphQL schema that embed a struct that is based on the interface that subsequent types are implementing, i.e.
It would be great if the generated go code could be something like:
Currently, it seems to generate structs based on the types only and repeating the fields from the interface in all of the structs; with a large number of fields, it gets very cumbersome to pass the interface data between the different types.
What do you think ?
EDIT: Found #626 which seems to address exactly this but there doesn't seem to have been any progress on this 🤔
Beta Was this translation helpful? Give feedback.
All reactions