Skip to main content
Solved

interfaces vs. types

  • 20 March 2023
  • 1 reply
  • 46 views

Juan Alvarado
Seasoned
Forum|alt.badge.img

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?

Best answer by Anders Hafreager

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

View original

Anders Hafreager
Practitioner

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


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings