Here are the main differentiating features of GraphQL when compared to REST:
- Schema-driven: The schema acts as a contract between the server and its clients.
- Single HTTP endpoint: A single endpoint and access to data and operations are achieved through the query language.
- Flexible data retrieval: Enables the client to select data in the response with a fine level of granularity, thereby avoiding over- or under-fetching data.
- Reduction of server requests: The language allows the client to aggregate the expected data into a single request.
- Easier version management: Enables the creation of new data while deprecating old ones.
- Partial results: A result is made up of data and errors. Clients are responsible ...