The primary goal of this chapter is to build a profile page for your users. We need a separate page to show all of the content that a single user has entered or created. The content would not fit next to the posts feed. When looking at Facebook, we can see that every user has their own address, under which we can find the profile page of a specific user. We are going to create our profile page in the same way, and use the username as the custom path.
We have to implement the following features:
- We add a new parameterized route for the user profile. The path starts with /user/ and follows a username.
- We change the user profile page to send all GraphQL queries, including the username route parameter, inside of the variables field of the GraphQL request.
- We edit the postsFeed query to filter all posts by the username parameter provided.
- We implement...