I’ve never heard of GraphQL interfaces. Thanks for introducing them to me.
The schema for my current project is simple so I have no need for interface. But I can see it being useful for schema with multiple types that are similar to each other.
Do you think interface is akin to objects namely the parent and children concept? Although there is no inheritance, the similarity here is that all children of a parent possess their parent’s fields but it’s not the same vice versa as the children will have extended fields.
That's a good way to think about it. An interface is like a parent object and then the children types have all of the fields of the parent plus additional fields. I have some slides that show a little more detail about this here.
I’ve never heard of GraphQL interfaces. Thanks for introducing them to me.
The schema for my current project is simple so I have no need for interface. But I can see it being useful for schema with multiple types that are similar to each other.
Do you think interface is akin to objects namely the parent and children concept? Although there is no inheritance, the similarity here is that all children of a parent possess their parent’s fields but it’s not the same vice versa as the children will have extended fields.
Hey thanks for reading this and the comment here.
That's a good way to think about it. An interface is like a parent object and then the children types have all of the fields of the parent plus additional fields. I have some slides that show a little more detail about this here.
Hope that helps!
Thanks for the slides. It’s helpful!
Looking at those boxes reminds me a lot of ERD haha.