From the course: Build a Lightweight Full-Stack Headless CMS Using Next.js, Contentful, and GraphQL

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Solution: Request content entry from the Contentful API

Solution: Request content entry from the Contentful API

(upbeat music) - [Instructor] Now that we've familiarized ourselves and tried to query content that is outside of posts, I'm going to go ahead and show you how I use these functions that already exist in this file to query menu items from when I created a new content type earlier. I basically followed, there was a lot of copy and paste, but just follow along, and then if your approach was different, totally okay. If this was tricky, also okay. The fact that you even attempted and put in effort is a great thing already, so let's go ahead and follow along, right? So I used the GraphQL IDE to figure out what would the query look like in the first place, right? So I know that I made a menu item collection because I made a new content type. It already creates a collection for me. I know that there's items, there's a description, a menu image. Whenever you upload images or non-text content, it's always going to have a URL that you can reference in your front end, and then you also have an…

Contents