Practice English vocabulary for testing GraphQL APIs: integration tests, resolver mocking, snapshot testing, contract testing, and resolver coverage.
0 / 5 completed
1 / 5
What does 'integration test queries the schema directly' mean?
Integration tests for GraphQL execute actual query strings against the server, exercising the schema, resolvers, data loaders, and response serialization together — more realistic than unit-testing resolvers in isolation.
2 / 5
What does 'we mock the resolver in unit tests' mean?
Resolver unit tests replace actual data sources with mocks (e.g., jest.mock). This tests the resolver's business logic — field transformations, authorization checks, error handling — without needing real infrastructure.
3 / 5
What does 'the snapshot test catches schema changes' mean?
Schema snapshot tests serialize the full GraphQL schema as a string and compare it against a stored snapshot. Any unintentional schema change (added/removed type, changed field) is caught immediately, preventing accidental breaking changes.
4 / 5
What is 'schema-based contract testing' for GraphQL?
Contract testing ensures the provider (GraphQL server) and consumers (clients) agree on the schema. Tools like Pact or custom schema comparison verify that changes to the schema don't break the documented contract that clients rely on.
5 / 5
What does 'the test coverage tool reports resolver coverage' mean?
Resolver coverage tools (like graphql-coverage) analyze which resolvers are exercised by tests. Low resolver coverage means parts of the API are untested and could have bugs that only appear in production when those fields are queried.