graphql-testing
Skill1 starsChanged 52 days agoMITView on GitHub
Use when testing GraphQL APIs — queries, mutations, subscriptions, schema validation and breaking-change detection, N+1 queries, depth/complexity limits, introspection exposure, authorization per field, batching abuse, and federation contracts.
In this repository98 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 42crunch-api-security-testingSkill
- a-b-testingSkill
- acceptance-testingSkill
- accessibility-testingSkill
- ai-agent-evaluationSkill
- ai-code-securitySkill
- ai-ml-testingSkill
- analytics-tracking-testingSkill
- api-testingSkill
- authn-authz-testingSkill
- autonomous-qa-orchestrationSkill
- bdd-gherkin-testingSkill
- blockchain-smart-contract-testingSkill
- bug-reportingSkill
- chaos-resilience-testingSkill
- chatbot-voice-agent-testingSkill
- cicd-testingSkill
- cli-testingSkill
- cloud-infrastructure-testingSkill
- code-coverage-analysisSkill
- compatibility-testingSkill
- compliance-testingSkill
- concurrency-race-condition-testingSkill
- configuration-feature-flag-testingSkill
- contract-testingSkill
- cross-browser-testingSkill
- database-testingSkill
- data-migration-testingSkill
- data-pipeline-etl-testingSkill
- date-time-timezone-testingSkill
- desktop-app-testingSkill
- disaster-recovery-backup-testingSkill
- e2e-testingSkill
- email-notification-testingSkill
- event-driven-messaging-testingSkill
- exploratory-testingSkill
- flaky-test-managementSkill
- functional-testingSkill
- fuzz-testingSkill
- game-testingSkill
- iac-container-security-testingSkill
- installation-upgrade-testingSkill
- integration-testingSkill
- iot-embedded-testingSkill
- llm-security-auditSkill
- llm-testingSkill
- localization-testingSkill
- manual-testingSkill
- mcp-testingSkill
- memory-leak-resource-testingSkill
- microservices-testingSkill
- mobile-testingSkill
- mutation-testingSkill
- observability-testingSkill
- payment-ecommerce-testingSkill
- performance-testingSkill
- production-monitoring-synthetic-testingSkill
- property-based-testingSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Resolver units: call resolvers with mocked context/dataloaders.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GraphQL Testing
GraphQL moves risk from URLs to schema + resolvers: one endpoint, client-defined queries, per-field auth.
Test layers
- Schema: lint & diff for breaking changes —
graphql-inspector diff old.graphql new.graphql,rover subgraph check(federation),graphql-schema-linter. - Resolver units: call resolvers with mocked context/dataloaders.
- Operation tests against a running server (in-memory
executeOperationor HTTP). - Contract: persisted queries/operations used by real clients must still validate against the new schema (
graphql-inspector validate 'src/**/*.graphql' schema.graphql). - Non-functional: complexity, depth, rate limits, N+1, latency.
Operation tests
const res = await server.executeOperation({
query: `query($id: ID!){ order(id:$id){ id total items{ sku qty } } }`,
variables: { id: "A-991" } }, { contextValue: ctxFor("alice") });
expect(res.body.singleResult.errors).toBeUndefined();curl -s $URL/graphql -H 'content-type: application/json' -H "authorization: Bearer $T" \
-d '{"query":"{ __typename }"}'Cover: nullability (! fields returning null bubbles up), partial errors (data + errors), input validation/coercion, enums & custom scalars, pagination (Relay cursors: first/after, stable ordering, empty page), mutations return payload + userErrors, idempotency, subscriptions (connect, auth on connect, reconnect, ordering, unsubscribe leak).
Security & abuse checklist
| Risk | Test |
| Introspection in prod | {__schema{types{name}}} should be disabled/restricted |
| Depth/complexity DoS | Deeply nested & aliased queries must be rejected (depthLimit, cost analysis) |
| Batching/alias abuse | 1000 aliases of login → rate-limited (brute force bypass) |
| Field-level authz (BOLA) | User A queries user(id: B){ email } → denied |
| Mass assignment | Extra input fields ignored/rejected |
| Injection | SQL/NoSQL via arguments; SSRF via URL args |
| Verbose errors | No stack traces / SQL in errors[].extensions |
| CSRF on GET/multipart | Content-type enforcement |
Tools: graphql-cop, InQL, clairvoyance (schema recovery when introspection is off), Escape/StackHawk scanners. |
Performance
Detect N+1: count DB queries per request (log/APM), require DataLoader batching; test large lists & fan-out; measure p95 by operation name (persisted-query ID).
Related
api-testing, contract-testing, security-testing, microservices-testing, performance-testing
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

