Ask HN: Are you still using REST for your new projects?
We tried GraphQL but ended up going back to good old REST.
We found that implementation of GraphQL in the server became too complex once you introduce authentication and authorization.
Also, since GraphQL assumes the client knows what it wants to receive, some cases where the data was unknown couldn't be solved elegantly. For example receiving a tree with an unknown number of levels for describing menus and submenus.
This was over a year ago so I'm guessing the waters are more clear now.
Is everyone moving to GraphQL or are you still using REST for new projects?
1 comment
[ 2.7 ms ] story [ 14.8 ms ] threadI think GraphQL only adds query to rest. Could be an implementation burden on the server side in order to fulfill different queries. For a site like facebook, which provides public API, GraphQL might have more flexibility. But for my personal project, I write both the backend and the frontend, I know exactly what data I want for each endpoint. There is no flexibility needed, as I design the database, the api endpoints based on my specific use-case.
And I don't want to support any public apis