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.
Code for this video can be found on @thetealpickleβs GitHub at the cheese-api-swift repository ππΎ https://github.com/thetealpickle/cheese-api-swift
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 π
https://instagram.com/thetealpickle
https://twitter.com/thetealpickle
https://github.com/thetealpickle
Brought to you by JESSICA JEAN JOSEPH Β© THETEALPICKLE
Top comments (0)