Run Schemathesis via Docker against your GraphQL endpoint:
docker run schemathesis/schemathesis \
run https://your.app.com/graphql
Schemathesis will generate queries matching your GraphQL schema and catch server crashes automatically. Generated queries have arbitrary depth and may contain any subset of GraphQL types defined in the input schema. They expose edge cases in your code that are unlikely to be found otherwise.
Note that you can write your app in any programming language; the tool will communicate with it over HTTP.
For example, running the command above against https://bahnql.herokuapp.com/graphql
uncovers that running the { search(searchTerm: "") { stations { name } } }
query leads to a server error:
{
"errors": [
{
"message": "Cannot read property 'city' of undefined",
"locations": [
{
"line": 1,
"column": 28
}
],
"path": ["search", "stations"]
}
],
"data": null
}
Microcks is a platform for turning your API and microservices assets - GraphQL schemas, OpenAPI specs, AsyncAPI specs, gRPC protobuf, Postman collections, SoapUI projects_ - into live simulations in seconds.
It also reuses these assets for running compliance and non-regression tests against your API implementation. We provide integrations with Jenkins, GitHub Actions, Tekton and many others through a simple CLI.
Run gqt
against your GraphQL endpoint. Build your query in an
intuitive TUI and execute it. The response from the server is written
to standard output.
gqt -e https://your.app.com/graphql