restembeddinggraphqlpartial-response

Difference between GraphQL and Embedding


I'm just playing a little with graphql and can not yet recognize the difference between graphql and REST with embedding and partial response.

Partial Response is used by TeamCity since years and it works as "Restful" Service

https://github.com/dotarj/PartialResponse

http://v2.wp-api.org/reference/links.html


Solution

  • REST is an architectural style, not a format or a query language (like GraphQL is). It is possible to build an API which supports partial resources or a hierarchy of resources (other examples would include JSON patch or JSON Graph), but such approaches are not a conceptual part of REST. On the other hand, they are a conceptual part of GraphQL. You picked examples which bear some similarity with GraphQL, but this is not due to the fact that they are RESTful services.

    On the other hand, REST is based on a few approaches that do not conform with GraphQL (or vice versa). An incomplete list includes: