1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Create initial data with the `onConnect` async method in Keystone

    graphqlGraphQL

    In this lesson, we see how we can create initial data in our database. Our keystone instance has an async onConnect method that will run when a successful connection has been made to the database. We hook into that and create new items with keystone.createItems().