PART 2. In this video, I walk through refactoring endpoints to access and create model relationships within a Swift-based API. The Swift API created in this video leverages the Vapor 3 framework. Models naturally interact with other models and in Vapor these model interactions are made possible by creating relationships. There are two types of relationships, one-to-many and many-to-many.
This video is PART 2 of the model relationship videos. Part 1 shows how to create relationships within the models and database.
Want to follow along? Get the starter code at the cheese-api-swift repository on the vapor-relationships-start branch 👉🏾 https://github.com/thetealpickle/cheese-api-swift/tree/vapor-relationships-start
Follow me on social media @thetealpickle to stay connected with the Pickle universe 🌎
Brought to you by JESSICA JEAN JOSEPH © THETEALPICKLE