Prev Next

API / GraphQL Interview Questions

Disadvantages of GraphQL.

Error Handling Complexity: The GraphQL queries always return a HTTP status code of 200, regardless of whether or not that query was successful. If your query is unsuccessful, your response JSON will have a top-level "errors" key with associated error messages and stacktrace. This can make it much more difficult to do error handling. This limitation also makes redirects(301) difficult to implemented compare to traditional REST redirects.

Lack of built-in caching support: It is complicated to implement a cache with GraphQL than implementing it in REST. In REST API, we access resources with URLs, so we can cache on a resource level because we have the resource URL as an identifier. However, In GraphQL, its complex because each query can be different, even though it operates on the same entity. But most of the libraries built on top of GraphQL offer an efficient caching mechanism.

Complexity: If you have a simple REST API and deal with data that is relatively consistent over time, you would better stick with your REST API.

Rate Limiting Complexity: In REST API, you can simply specify that we allow only this amount of requests in one day, but in GraphQL, it is difficult to specify because it doesn't have different endpoints/varied JSON request structure.

Invest now in Acorns!!! 🚀 Join Acorns and get your $5 bonus!

Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!

Earn passively and while sleeping

Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.

Invest now!!! Get Free equity stock (US, UK only)!

Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.

The Robinhood app makes it easy to trade stocks, crypto and more.


Webull! Receive free stock by signing up using the link: Webull signup.

More Related questions...

Show more question and Answers...

Docker Interview questions

Comments & Discussions