Message of the day:
Anything GraphQL and SilverStripe related.
likes GraphQL. The same API, but not the hassle of REST or SOAP
At least that’s how I think it works
But you can declare multiple types via unions
if you didn’t want to specify ... on PageType
Because you can only declare one interface as the return type of a query
@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.
Also, OMG this spec is so much more readable than e.g. http://www.odata.org/ (which is a similar scope)
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:
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
“verbose but scaffoldable” - yep, and you can always choose to flatten it down for advanced use cases (which don’t go through the scaffolder)
Scaffolding unions wouldn’t be too hard either