NestJS · Middle · Question 48 of 75
What does @ResolveField() do in a GraphQL resolver?
- 1Marks a field as deprecated
- ✓Correct answer: Resolves a field of a type separately, e.g. loading
authorfor eachPost, often with DataLoader to avoid N+1 - 3Validates GraphQL input
Explanation
Without batching, resolving author for 100 posts triggers 100 queries.