> For the complete documentation index, see [llms.txt](https://security.navidnaf.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://security.navidnaf.com/marauders-map/api-pentesting/graphql/primer.md).

# Primer

GraphQL is an API query language. It uses a specific syntax to query a server to request or mutate data. It is an alternative to REST, which is accessed through different endpoints.

### Drawbacks of REST

* **Overfetching:** Getting back more data than we need. In the following example, we might request just the names of the courses, but it may provide a bunch of other data that we do not need. This means it gives out extra data.

```
GET ../api/courses

{
id: 1,
name: 'something',
thumb_url: 'URL'
}
```

* Underfetching: Getting back less data than we need.&#x20;
