GraphQL & REST with Typescript, Prisma and Azure SQL: love at first sight!
Davide Mauri
Posted on October 11, 2021
If you're into Typescript and prefer a code-first approach when working with databases, you'll be happy to learn about Prisma! Prisma is a next-generation Node.js and TypeScript ORM, that allows you to define a schema using a dedicated DSL so that you can then have all the comforts of modern development environments like intellisense, static type checking, automatic scaffolding and more.
To help everyone, even those who just started working as coders - or those who want to start a career as software engineers - we have created a fully working end-to-end full-stack solution that has:
- a frontend written with Vue.Js
- a backend, written in Typescript and using Prisma
- an Azure SQL database (for the reasons explained here)
to make it consumable by really everyone, we also decided to support both REST and GraphQL protocols and we also decided to make sure that everyone can take advantage of a streamlined CI/CD experience, so we used Azure Static Web Apps and GitHub Actions to glue everything together.
Last, but not least, the sample also support Authentication and Authorization (which is super simple thanks to Azure Static Web Apps!)
I must say I'm happy and proud of what has been done, as this example is a great learning experience and starting point for everyone interested in becoming a better developer.
So, look at the article here to learn more about Prisma:
Modern application development with Prisma, GraphQL (or REST) and Azure SQL
and to the repository hear to deploy the code on your own:
Azure-Samples / azure-sql-db-prisma
Full-Stack End-To-End implementation - both with REST and GraphQL support - with Azure SQL and Prisma.io of the well-known To-do list sample.
The repository is fully documented. You should be easily able to set up your working environment in no time. If you want to see it in action and learn about it before starting to use it, I did a session at the Prima Meetup that you can watch here:
As usual, enjoy!
Posted on October 11, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
October 11, 2021