Apache Benchmark :: Testing GraphQL API
To test your GraphQL API with ab
you need to create a file containing your query / mutation like this:
query.txt
{"query":"{users { entries { name id email permissionFlags { canEdit } status }}}"}
Then you have to run ab
with -p
and -T
arguments.
E.g:
ab -n 100 \ -H 'authorization: Token' \ -T 'application/json' \ -p query.txt 'https://localhost/graphql'