3 ms·
Are there any performance benchmarks comparing REST and GraphQL?
by yumraj 6y ago
Are there any performance benchmarks comparing REST and GraphQL?
- wobblyasp 6y agoThey'll both be as fast as your implementation; but GraphQL will most likely have some additional overhead, likely offset with caching. GraphQL isn't a magic bullet; you still need to implement/define how the data is returned.
- IshKebab 6y agoI think they're too different for that to be meaningful. GraphQL lets you do way more in a query, which means you need fewer queries. It would be like comparing PostgreSQL with Redis, or something.
- yumraj 6y agoYes, GraphQL would require fewer round trips than corresponding individual queries via REST, but that logic of mapping a GraphQL query to individual SQL queries from the DB resides in the GraphQL layer. So, the question is how does that overhead compare to the overhead caused by multiple REST api calls? And, in addition, how do the GraphQL layers scale as the GraphQL queries become complicated and larger.