API Design · Senior · Question 45 of 75
What's the trade-off of exposing a generic query API (e.g. OData filters or raw GraphQL access to all data)?
- 1There is no trade-off
- ✓Correct answer: Flexibility for clients versus hard-to-predict performance, harder authorization and a huge contract surface you must keep compatible
- 3Generic APIs are always faster
Explanation
Constrain what can be queried and measure actual usage before widening it.