Closed MikeVeerman closed 5 years ago
Hi @MikeVeerman ,
Thanks so much for your suggestion. Your suggestion makes total sense. I will gladly accept your PR as long as you add a unit test following the instructions of the README.md file here https://github.com/nicolasdao/graphql-s2s#contribute.
Let me know if you need help.
Thanks a lot again,
Nic
Dear Nicolas,
Inheritance is really missing from GraphQL, so this library is a great contribution to the ecosystem!
I'm currently running into a use case where we want to inherit with an interface. This currently works by doing something like this :
This is a bit verbose, but we also end up with a type that we will never use (NodeParent). This "abstract class" will be visible to the user through GraphQL introspection.
I have an alternative in mind that allows developers to still hand pick interface implementation, but allows them to inherit when they want to. It would allow inheriting from interfaces.
What I was thinking of was code that transpiles this :
into this :
I've built this locally with minimal code changes and was wondering if you would accept a PR that allowed this use case.
Kind regards, Mike