Solution 1: Generating a GraphQL query

GraphQL returns exactly what we asked for, which means we need to specify the data we want in our query. We need the last three products, as well as their name, price, ID, slug, image URL, and category slug from the shoes model.

Get hands-on with 1400+ tech skills courses.