API Design · Senior · Question 23 of 75
What's a risk of exposing database models directly as a GraphQL schema?
- 1GraphQL can't describe database models
- ✓Correct answer: The API becomes coupled to storage, leaks internal fields, and lets clients build expensive joins you didn't plan for
- 3It makes queries faster
Explanation
Design the schema around client use cases and domain concepts, and add authorization per field where needed.