DEV Community

Adilakshmi Bonala
Adilakshmi Bonala

Posted on

Advantages and disadvantages of GraphQL

GraphQL:

GraphQL is a syntax that describes how to ask for data and is generally used to load data from a server to a client.

Advantages:

  1. A single endpoint that takes multiple parameters dynamically.
  2. It allows more dynamic development.
  3. Allows rapid iterations and fast feedback from businesses.
  4. No over fetch and under fetch of data.
  5. It saves backend development time.
  6. It is faster than other communication APIs because you can cut down the request and the fields which you need only.
  7. Strongly typed query language.
    • Because it is strongly typed most of the errors will be reduced at compile time itself.
  8. No versioning of APIs is required.
  9. The client will query only the required data needed.
  10. It makes it easier to aggregate data from multiple sources.

Disadvantages:

  1. If the query requested by the server is too large then the response will be slow.
  2. More complicated to implement cache, because for a single endpoint the query will be changed.
  3. Rate limiting
    • In REST we can specify the number of requests allowed in a day, but in GraphQL it is very complex for that statement.

Thank you...

Top comments (0)