A query language to write schema on backend server. Unlike SQL (query language for database), GraphQL follows a stricter format and gets utilized on API, which, usually gets compared to RESTful API.
For query language for API from backend side.
Pros
- Retrieve the exact data based on pre-set schema (while REST API retrieves a full result which might contains irrelevant/ redundant data)
- Single request for multiple resources (REST API requires separate API for each table)
- Notify update when data is changed
Cons
- Rare on adoption
- Hard to pick up
- Inappropriate for constantly fectch data system
Reference
https://exarhouleasjohn.medium.com/what-is-graphql-6dcc27a18914