lem lem - 1 year ago 129
reST (reStructuredText) Question

Is GraphQL stateless?

Out of curiosity I start to read about GraphQL. Based on the samples on this article, it looks like REST API request to me. Is it stateless? means it has no request, no response from the server? If yes, then how come it is more resource lighter than REST API?

Answer Source

GraphQL is often referred to as more efficient than REST because it allows clients to ask for multiple resources in one request, which saves round trips, and also allows clients to filter down to only the fields they actually need. So at the end of the day the way requests are done seems similar, but the more powerful query language allows the client to get exactly the data they need and no more.

And yes, it's stateless just like REST is. In fact some might say that GraphQL meets a lot of the original requirements that REST described.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download