Beyond REST – Web API with GraphQL
Up until this point, we have always assumed that the ASP.NET Web APIs used to feed data to our Angular app would do their job using the Representational State Transfer (REST) architectural style. Such an assumption is fully justified by the fact that REST has been the most popular option for accessing web services for decades, having imposed itself on all previous alternatives (such as SOAP) thanks to its undeniable advantages in terms of reliability, performance, and bandwidth usage.
However, despite having become the de facto standard for most data retrieval tasks, the REST approach is not always ideal in all circumstances and might suffer from some undeniable shortcomings, such as being unable to keep up with the rapidly changing requirements of the clients.
In this chapter, we’re going to introduce a modern query language created with the specific aim of providing a more efficient and flexible alternative to the traditional...