Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 559 Bytes

README.md

File metadata and controls

14 lines (9 loc) · 559 Bytes

GraphQL Ops Counter Demonstration

This is a test to see if GraphQL produces the expected amount of requests for a given query.

To run locally:

  1. Clone the repo
  2. cd into directory and install dependencies via pnpm i
  3. cp .env.example .env
  4. 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.