DEV Community

Cover image for [VIDEO]Refactoring Endpoints with Relationships in a Swift API 🌚β™₯️🌝(Swift 5.1/Vapor 3)
✨ thetealpickle πŸ“±
✨ thetealpickle πŸ“±

Posted on • Edited on

[VIDEO]Refactoring Endpoints with Relationships in a Swift API 🌚β™₯️🌝(Swift 5.1/Vapor 3)

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)