4 ms·
Curious to know if you would count "ecosystem" as a point towards either? Afaik there isn't a standardized way of creating statically typed schemas for REST. A
by cheapsteak 8y ago
Curious to know if you would count "ecosystem" as a point towards either? Afaik there isn't a standardized way of creating statically typed schemas for REST. A standard statically typed schema like GraphQL's allows a community to create and maintain tooling around it. A person would create"[some tool] for GraphQL" instead of "[some tool] for [specific api]"
- bcheung 8y agoThere's Open API Specification (Swagger). It's more documentation than strict protocol enforcement though.
- bcheung 8y agoIn theory, yes, but in the case of GraphQL, I found it was very difficult to generate schemas dynamically. Factoring out common fields was not possible. Common fields in schemas had to be duplicated and there was no concept of an include/mixin/extends/etc. Best technique was generating plaintext strings of GraphQL programmatically (losing any editor or type checking support). Dropping down to the AST layer of GraphQL is a bit more programmatic but not really an ideal level of abstraction to work at. It was too verbose and low level. REST integrates well with native JS constructs (it's just data) so it's much easier to compose and use metaprogramming techniques.