DEV Community

Cover image for GraphQL & REST with Typescript, Prisma and Azure SQL: love at first sight!
Davide Mauri for Microsoft Azure

Posted on

44 11

GraphQL & REST with Typescript, Prisma and Azure SQL: love at first sight!

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:

GitHub logo 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!

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (3)

Collapse
 
rammina profile image
Rammina • • Edited

Hey, we're actually using similar tech stacks! I just use AWS instead of Azure, and React instead of Vue.js.

Pretty informative post.

Collapse
 
yorek profile image
Davide Mauri •

Yeah, at the end of the day it's a Jamstack architecture, which can be done with a huge number of technologies / frameworks / languages

Collapse
 
alexweininger profile image
Alex Weininger •

Have you tried the Azure Static Web Apps VS Code extension?

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more