From the course: ASP.NET Core: Building a GraphQL API

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

GraphQL vs. REST

GraphQL vs. REST

- [Instructor] First of all, it's important to know that REST and GraphQL are two API design approaches that fulfill the same function. The data transmission over internet protocols, such as the HTTP. However, the way they work varies significantly. For example, the GraphQL is a query language, and REST is an architectural pattern. On GraphQL, you have a single endpoint, and you basically customize the query based on the data that you need as a response. On the other hand, you have multiple endpoints. And we said that in complex applications, you have lots and lots of API endpoints. For example, you could have an API endpoint to get all the courses. You could have an API endpoint to get all the books and then to get the details, to delete them, and much more. The GraphQL is client-driven architecture, but REST is server-driven architecture. A downside of GraphQL is that in GraphQL you do not have automatic caching…

Contents