News for hackers. Stuff that matters.
Re:API Design Guide by ako on Wednesday February 22, 2017 @03:23PM (#13708831)
Any idea how it compares to oData?
Re:API Design Guide by e1g on Wednesday February 22, 2017 @10:02PM (#13711286)
Sorry, no experience with oData so can't give a useful comparison. One obvious difference is that GraphQL requires a structured query, which will always guarantee the structure of the response data. It's like static typing for business data objects. oData seems to embrace REST, so when I request a resource /person/james I have no assurances about what the response will look like. What fields are present? Is "email" a string or an array of strings? What's deprecated? RTFM. GraphQL is explicit so I know exactly what data is used in what views - makes change and debugging that much easier.
Re:API Design Guide by lenkite on Thursday February 23, 2017 @12:44AM (#13711902)
OData requests and responses have schemas, so you definitely have assurances on the field types. You _do_ know that email is a string or array of strings. http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part3...