I saw in many sites that compare REST with GraphQL. after investigating this concern (actually my concern) that, "is it a correct comparison?", I being more confused. Since the REST has a different definition against GraphQL, this question busies my mind that, why we'll be able to compare two different concepts together.
actually, it seems to me that the comparison is something like this:
IDE Vs Compiler !??! or BMW x6 Vs ISO 18541-5 (Road vehicles)
Representational State Transfer (REST) is a software architectural style that defines a set of constraints to be used for creating Web services.
GraphQL is an open-source data query and manipulation language for APIs, and a runtime for fulfilling queries with existing data.
please brighten my mind with your answers. thanks