Should I use GraphQL?
I want to create an API. Should I use the GraphQL, or it is just a hype, and the old familiar RESTful API will be better?
I want to create an API. Should I use the GraphQL, or it is just a hype, and the old familiar RESTful API will be better?
It depends on the way how you assume your API will be used. Can you tell a little bit more about your API?
This is just an API for fetching data from different internal resources. I am also developing the web and mobile application, and they will need to use this API for their activity.
How many endpoints are you going to create in your API?
Actually, I am not sure yet, but probably from 5 to 10.
If you are going to use the API by both mobile and web application, I think that it is a good reason to create it using GraphQL. Also, you can simplify the structure of the API: instead of having many endpoints, with GraphQL, you will have just one single endpoint.
Yes, @Zuska is right. Facebook, where the GraphQL was developed, created the GraphQL precisely for API standardization. They didn't want an API to have many endpoints, and also, they needed to use API both with mobile and web applications. If they would develop RESTful API, they had to create different endpoints for mobile and web, because different data often should be fetched (mobile apps are typically interested in smaller amounts of data due to slow and limited Internet connection).
Thanks! I understood the use cases where GraphQL is advisable. Now I need to think whether I actually want to use it.
Just drop us an email to ... Show more