How to create single content page

Well, I think the response is obvious here. You are not providing the ID of the character that you want to get. This means that your query DOES work, it just doesn’t receive the ID of the character. If you think you provided the ID, then you can console.log its value before Quering to be sure that it’s still there.

This is how your Query should be called in the frontend code:

 <Query query={CHARACTER_QUERY} id={id}> //chacater id provided

Where <Query/> is a reusable component for data fetching and CHARACTER_QUERY is your custom GQL Query that you provided above, which fetches the data for a single character by using ID.

Take a look at this article, search in page for the next Chapters:

  1. Create the Query component (creates the reusable Query component)
  2. Create the Article container (creates the container that displays data for a single Article & creates the ARTICLE_QUERY which fetches the data for that article by using only ID)