Implement the data retrieval

With the queries and types in place, it's time to bring them together and retrieve the data in our application.

To implement the data retrieval:

  1. In Visual Studio Code, open the starter kit repository and go to the /lib folder.

  2. Create a copy of the Recipe folder and name it Events.

  3. In the Events folder, rename the recipe-lib.ts file to event-lib.ts. This file will fetch all events, a single event by ID, and events with specific IDs.

  4. Open this file and modify it as shown in the following code sample, changing all mentions of recipes to equivalent mentions of events. Ensure the new text matches the case of the original.

Do you have some feedback for us?

If you have suggestions for improving this article,