How does testing GraphQL differ from testing resource-oriented REST endpoints?
Answer
Validate schema and type rules, queries, mutations, variables, fragments, null propagation and field-level authorization. Also test query complexity, batching and resolver failures because one endpoint can expose many operations and partial errors.
Strong answer includes
- schema and resolver behaviour
- field-level authorization
- complexity and partial errors
Practical example
A tester finds that a GraphQL query for a user profile returns a partial result with data for most fields but a null for 'salary' along with an error in the errors array, because the resolver for that specific field checks authorization separately — a class of bug that plain REST status-code testing wouldn't surface.