DEV Community

Discussion on: What is a REST API?

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

Cache: Designed to encourage caching, REST expects responses to be labeled as cacheable or non-cacheable. This allows clients to reuse responses for future requests if needed.

It would be nice if you explain this more.

Also, it might contrast with GraphQL's GET vs POST.

It might be related to this.

Collapse
 
markmichon profile image
Mark Michon

πŸ‘Caching (both on certain platforms and in various data structures) could be it's own article, as it's a pretty broad subject.

Regarding GraphQL, it is POST only as the query/mutation needs to be sent stringified in the body. The GraphQL spec itself doesn't have any cache support built-in, though they do recommend this approach