Compare REST and GraphQL Using k6 For Performance Testing
For many companies, performance is the main reason to go with GraphQL. But is that a valid argument? Often developers compare GraphQL to REST APIs and see the N+1 requests (or over-fetching) as an important reason to go for GraphQL. Let's put that to the test and explore if GraphQL APIs actually can outperform existing REST APIs. For this, we'll take a GraphQL-ized REST API (from JSONPlaceholder) and test the performance of GraphQL and compare it to the REST approach.