Course lesson

Build a GraphQL Query with Exactly the Data you need for a Posts Page

The benefit of GraphQL is to have all the data you need in one request, with nothing more or less.

Duration
1 min
Access
Pro
Transcript
Available

The benefit of GraphQL is to have all the data you need in one request, with nothing more or less.

If you had a REST API, you would typically receive the entire object back in your response. This leads to over fetching and can result in performance issues. With GraphQL, you only receive the data you explicitly request.

In this lesson, we will build a GraphQL query that queries only the essential data needed on the front end to display a post.