46 / 65 · 14 API Testing Fundamentals · GraphQL Testing← prev⊞ allnext →☰ Read as one page
6.7Practical Exercise
- Write tests for a GraphQL query: valid query, query with variables, query for non-existent resource
- Write a mutation test with input validation (missing required fields)
- Test that introspection is disabled (or that you know whether it should be enabled/disabled)
- Test query depth limiting with a deeply nested query
- Test authorization: verify that different roles see different fields