This is a test to see if GraphQL produces the expected amount of requests for a given query.
To run locally:
- Clone the repo
cd
into directory and install dependencies viapnpm i
cp .env.example .env
pnpm dev
Then, once it's running, you can hit the http://localhost:3000/api/test-graphql
endpoint to perform a test query.
The opsCounter
plugin is configured to allow a max of 15 queries, but warn at 12. You'll see that as expected, there are 12 queries made for the GraphQL query that is run.