Querying content items
Weâre introducing the ability to generate GraphQL queries from the Prepr interface. Simply click the button shown below when editing a content item.

This will open the Apollo API Explorer and generate a query to retrieve the data from the selected content item. The query includes all fields of the model by default.
From there, simply click âRunâ to execute the query. The response will appear on the right. You will notice that it includes all of the data from that content item.
Once you have successfully tested the query, you can simply copy it and use it in the code of your front-end project. Of course, you can also change the fields in the request to test different queries and see if they generate the desired response.

Querying similar items
In addition to the API Explorer functionality for querying specific content items, weâre also introducing the API Explorer for querying content recommendations generated by our algorithm. To use this feature, simply click the arrow next to the âOpen in API Explorerâ button and select âSimilar itemsâ from the dropdown menu.

This will open the Apollo API Explorer and generate a query to retrieve similar content items. Click âRunâ to execute the query. You will notice that the response includes the data from content items similar to the item you selected. It wonât include data from that item itself. This makes the query very suitable for displaying content recommendations on your content detail pages. To learn more about generating content recommendations, head to our dedicated step-by-step guide.

