- We only define a single endpoint (for example http://example/graphql).
- Since this is a query language, all actions are done through a POST .
It means we query directly the only endpoint requesting for specific data.
Every GraphQL schema has three special root types: Query, Mutation, and Subscription. The root types correspond to the three operation types offered by GraphQL: queries, mutations, and subscriptions. The fields on these root types are called root fields and define the available API operations.
- Query: We will look for specific data (equivalent to a GET, but selecting the attributes of our choice)
- Mutation: We want to change the data (we can compare it to the POST, PUT, and DELETE actions)