GraphQL
A flexible API query language developed by Meta that allows clients to request exactly the specific data they need, and nothing more, in a single request.
What it is
Unlike REST, where a client might have to hit three different URLs to gather user data, posts, and comments (often over-fetching unnecessary data), GraphQL uses a single endpoint. The frontend developer writes a structured query specifying exactly which fields are required, and the backend aggregates and returns precisely that shaped data.
When you would use it
You implement GraphQL when your frontend application has complex data requirements and strict performance constraints, allowing the client to dictate exactly what data it needs.
Common operations
- Fetching highly complex, nested relational data for a mobile app in one fast request.
- Preventing massive data over-fetching to improve application load times.
Related terms
Where this is taught
No learning path uses this term yet. Browse the Learning Atlas for guided sequences through related ideas.