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.

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.

It's right time to invest in Cryptocurrencies Dogecoin! Earn free bitcoins up to $250 now by signing up.

Earn bitcoins upto $250 (free), invest in other Cryptocurrencies when you signup with blockfi. Use the referral link: Signup now and earn!

Using BlockFi, don't just buy crypto - start earning on it. Open an interest account with up to 8.6% APY, trade currencies, or borrow money without selling your assets.

Join CoinBase! We'll both receive $10 in free Bitcoin when they buy or sell their first $100 on Coinbase! Available in India also. Use the referral Join coinbase!

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