top of page
  • Writer's picturePriyanka Palshetkar

Exploring GraphQL as an alternative to REST API - Part 5

Let's summarize what we have learnt so far.

GraphQL does have some aspects that we need to be aware of. In GraphQL, server side caching is absent and the clear reason is we don’t know what data the client will request every time, so caching partial data is not helpful. And an obvious concern on security because the client has too much control on the data and therefore, we need to be sure of what we want the client to have control on. Also, file uploading doesn’t work with GraphQL.

And another interesting aspect is, that of Introspection. Suppose I am new and I don’t know what is the data we are dealing with as a client. So I want to know what all information I can get from this exposed GraphQL endpoint. So if I want to know about the Appetizers table, then I can query and get the info.

To conclude, should we look at GraphQL? Well, it depends. But the best part is we don’t have to choose between them. We can apply the best of both worlds, depending on our application’s requirements.


17 views0 comments

Comments


bottom of page