Summary
This chapter was entirely dedicated to GraphQL, an open source data query and manipulation language aiming to be a great alternative to the REST architectural style for some specific scenarios, as it allows the mitigation of some known REST limitations, such as over-fetching and the risks of regression bugs.
Following a quick review of the pros and cons of both approaches, we started to implement GraphQL in our WorldCities ASP.NET Core project. We did that using HotChocolate
, a comprehensive third-party .NET GraphQL platform that helped us to do that with minimal effort, mostly thanks to the fact that it provides great support to Entity Framework Core through its extension package.
Installing and configuring HotChocolate
gave us the chance to familiarize ourselves with several GraphQL-related concepts such as queries and mutations, all part of the overall GraphQL schema. Upon completing the setup, we also took the opportunity to practice with some actual queries during...