Nexus + Prisma: the Future of Backend
Setup GraphQL with Nexus + Prisma. Automate code generation, TypeScript generation, and crud resolvers.

GraphQL Nexus and Prisma is the future of backend development. It has the instant feedback you'd expect in 2021, and automates resolvers for common operations.
You can view the source code for this post on github
It does all of this while staying our of our way. Letting you build fully custom logic, while taking advantage of automated features for the simple things.
In this post we will go over how to set it up, and why it's so useful compared to the old days of 2017 when we had to manually make our GraphQL schema, database migrations, and generate TypeScript after we coded our resolvers.
Installing the dependencies
To get started, let's setup a new folder and install everything we need.
mkdir nexus-prisma-boilerplate
cd nexus-prisma-boilerplate
npm init
Let's copy over the package.json containing all the dependencies we will need:
{
"name": "nexus-prisma-boilerplate",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"@prisma/client": "^2.20.0",
"…
Keep reading with a 7-day free trial
Subscribe to zach.codes to keep reading this post and get 7 days of free access to the full post archives.