Query content using GraphQL
To verify that the setup was successful, let's create some test queries. Because the new content you just added has not yet been published, you can use the Preview API endpoint.
To query the content, you need to authenticate. In the Integrated Development Environment (IDE), on the HTTP HEADERS tab, add the API key using the following format (replacing the example API key):
Get all events and event details
This sample query gets all events, along with their details. This includes the event name, description, location, date, image, and agenda.
Because the eventImage and agenda fields are returned as objects or lists of objects, you need to fetch the specific fields from these objects.
Get information on the event, agenda, and speakers
The content model for this tutorial includes information on the event, agenda, and speakers. The following query fetches this information.