Skip to main content
Juan Alvarado
Seasoned ⭐️⭐️⭐️
Seasoned ⭐️⭐️⭐️
Mar 20, 2023 8:16 PM UTC
Solved

interfaces vs. types

More of a design question: only interfaces are allowed after the implements keyword, so you have to know what types you plan to extend beforehand, but this is not always possible or reliable. Since interfaces also produce views, I am tempted to make everything an interface, but are there any downsides?

Anders Hafreager
Practitioner ⭐️⭐️⭐️
Mar 21, 2023 8:44 AM UTC

Yeah, this is following the GraphQL spec. You can actually use interface everywhere and that should work fine! 

1 reply

Anders Hafreager
Practitioner ⭐️⭐️⭐️
Practitioner ⭐️⭐️⭐️
Mar 21, 2023 8:44 AM UTC

Yeah, this is following the GraphQL spec. You can actually use interface everywhere and that should work fine!