DEV Community

Discussion on: GraphQL vs REST - Conclusion

Collapse
 
omriyahoo profile image
Omri Ratson

In the "Why Rest" part you can eliminate points 1 and 2 by implementing key-values pair of the server for key - "name of the query" and in the server will be the value - "actual implementation of the query.
and only responed to this keys provided.
Of course you can provide paramaters so it's kinda of like calling a method on the server, you don't really care what's in the method, only the parameters and what the method returns.
You can validate as well the parameters to prevent overloading the server.
Hope it helps...

Some comments have been hidden by the post's author - find out more