Enums are a powerful language feature of Swift. They are more than a type-safe way of defining different states. But in this article, we’ll concentrate on the basic enum functionality in Swift and we’ll integrate them in a GraphQL API server which is based on Vapor. If you are new to GraphQL in combination with Vapor, I recommend reading my previous article where I go through the steps on how to build a GraphQL server with Swift and Vapor.

This Article can also be read on my personal blog: https://alexsteiner.de/blog/posts/graphql-with-vapor-part-2/

In this article, we’ll extend the todo API example. Therefore…


GraphQL is a query language for APIs developed by Facebook but open sourced in 2015. It is an alternative to REST-based APIs because it allows clients to decide which data they need instead of the server upfront deciding which data is delivered on each endpoint. It is a modern way of querying data, for example, some big companies next to Facebook like GitHub or Shopify have seen the advantages and implemented their APIs with GraphQL.

This Article can also be read on my personal blog: https://alexsteiner.de/blog/posts/graphql-with-vapor-part-1/

If you want to learn more about GraphQL go and check out their website


While building server-side Swift code you probably come along the requirement of sending an email to users. Let it be a confirmation, newsletter signup or a notification message. So we need some kind of email sending possibility. There are a lot of different email services to pick from when speaking about server-side development. (I have good experiences with https://github.com/LiveUI/MailCore but there are other options to pick from). But the advantages and disadvantages of different packages will not be further discussed in this article.

This Article can also be read on my personal blog: https://alexsteiner.de/blog/posts/email-content-dsl/

While sending emails it is possible…

Alexander Steiner

Server Side Swift developer with background in iOS and web development.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store