4 ms·
No one is stopping you from implementing a URL like: `/feed?include=users`, which is easier on the eyes than the GraphQL equivalent. But clients generally aren'
by daliwali 9y ago
No one is stopping you from implementing a URL like: `/feed?include=users`, which is easier on the eyes than the GraphQL equivalent. But clients generally aren't aware of the `include` query or what it does unless it's advertised from the server. There's URI templates (RFC 6570) which let you advertise it as `/feed{?include}`, but few clients understand URI templates. With GraphQL, it's part of the spec, but you must know that the server follows the spec anyways.
- ruslan_talpa 9y agoThis is exactly what PostgREST is doing, it's interface has the same expressive power as GraphQL
- ahoka 9y agoWhat's the point of discoverability when consumers don't know the semantic meaning? Does it help if you discover that you can add an include query? That you can pass the value "user"? What is a user? Maybe you can look it up in Swagger. Is that still discoverable? What if it needs more than just common sense to understand the business language?
- daliwali 9y agoThat's what a vocabulary is for. schema.org[0] has something semantically equivalent to a user, a person. [0] http://schema.org/Person http://schema.org/Person