API Design · Senior · Question 21 of 75
Why are persisted (allow-listed) queries valuable for public GraphQL APIs?
- 1They replace authentication
- ✓Correct answer: Clients send a query ID instead of arbitrary text, so the server runs only known queries, enabling GET caching and blocking expensive ad-hoc queries
- 3They make GraphQL schemas smaller
Explanation
For first-party apps, the build step can register all queries. Third-party APIs often still need complexity limits.