chillu

But you can declare multiple types via unions

wilr

if you didn’t want to specify ... on PageType

chillu

Because you can only declare one interface as the return type of a query

sminnee

@wilr I can’t quite see why you would need unions and interfaces, and it seems like using a union makes the relevant queries more awkward. but maybe i’m missing something.

chillu

Also, OMG this spec is so much more readable than e.g. http://www.odata.org/ (which is a similar scope)

chillu

Ah, there we go: http://facebook.github.io/graphql/#sec-Object-type-validation

> An object type must be a super‐set of all interfaces it implements:

chillu

http://facebook.github.io/graphql/#sec-Interfaces - I haven’t seen anything mentioned about implementing multiple interfaces, but can’t see a reason why it would be limited to one either

chillu

“verbose but scaffoldable” - yep, and you can always choose to flatten it down for advanced use cases (which don’t go through the scaffolder)

wilr

Scaffolding unions wouldn’t be too hard either