GraphQL Query Operations
A GraphQL query support 3 major types of operations –
- Query: It is used to fetch the data from the API server
- Mutation: It is used to update, insert, remove the data from the backend database or the API server
- Subscription: It is used to subscribe to the backend to get real-time updates about the data changes.
What is GraphQL Queries
GraphQL is a powerful open-source Query Language for APIs. It is most commonly known for its single endpoint query which allows the user to define a single endpoint to fetch all the information needed.
Queries in GraphQL allow us to retrieve the data from an API endpoint, and the data is what we specify in the query itself. In this article, we will learn about GraphQL Queries, and we will create some ourselves.