graphql-testing
Installation
SKILL.md
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.