SlideShare a Scribd company logo
@nikolasburk
Building GraphQL Servers
with Node.JS & Prisma
Nikolas Burk 👋
Developer at Prisma
$ whoami
@nikolasburk
Why GraphQL?
@nikolasburk
Query exactly the data
you need
Strongly typed schema
Schema stitching
Rich ecosystem &
Awesome community
Learn more 💡
https://blog.graph.cool/b60cfa683511
Top 5 Reasons To Use GraphQL
@nikolasburk
https://www.howtographql.com/basics/0-introduction/
GraphQL Introduction
GraphQL Server Development
@nikolasburk
3 parts of a GraphQL server
1. Structure: The GraphQL schema
2. Behaviour: Resolver functions
3. Network Layer: Network, Middleware, …
1) The GraphQL Schema
• Strongly typed & written in GraphQL Schema Definition
Language (SDL)
• Defines API capabilities ( = contract for client-server
communication)
• Special root types: Query, Mutation, Subscription
@nikolasburk
Example: Hello World
SCHEMA
@nikolasburk
SERVER RESPONSEQUERY
Example: CRUD for User type
@nikolasburk
2) Resolver functions
• Concrete implementation of the API
• One resolver function per field in SDL schema
• Query execution: Invoke resolvers for all fields in query
@nikolasburk
Example: Hello World
SCHEMA
@nikolasburk
RESOLVER
Example: CRUD for User type
@nikolasburk
3) Network Layer
• Based on `graphql-yoga`
• Network configuration: port, endpoints, CORS, …
• Middleware (analytics, logging, crash reporting,…)
@nikolasburk
…putting it all together
1) SCHEMA
2) RESOLVERS
3) NETWORK LAYER
x
Building a clone of the Medium API
…from scratch
• Queries
• Retrieve a list of all posts (or filter for `title` or `content`)
• Retrieve a single post by its `id`
• Mutations
• Create a new draft
• Publish a draft
• Delete any post by its `id` (published or draft)
@nikolasburk
Architecture
Steps
@nikolasburk
Step 0: Minimal GraphQL server
Step 1: Extend API with query arguments
Step 2: Complete API operations
Step 3: Add database layer with Prisma and Prisma bindings
Step 4: Complete API operations against the database
@nikolasburk
I code, you follow 🙌
Get the code
@nikolasburk
$ # clone the repo
$ git clone https://github.com/nikolasburk/amsjs-workshop.git
$ cd amsjs-workshop
$
$ # navigate to the initial setup
$ git checkout step0
Building GraphQL Servers with Node.JS & Prisma
We are hiring!
www.prisma.io/jobs

More Related Content

PDF
GraphQL & Prisma from Scratch
PDF
The GraphQL Ecosystem in 2018
PDF
Code-first GraphQL Server Development with Prisma
PDF
GraphQL Schema Stitching with Prisma & Contentful
PDF
Next-generation API Development with GraphQL and Prisma
PDF
Lambda architecture
PDF
Productionize spark structured streaming
PDF
Introduction to GraphQL
GraphQL & Prisma from Scratch
The GraphQL Ecosystem in 2018
Code-first GraphQL Server Development with Prisma
GraphQL Schema Stitching with Prisma & Contentful
Next-generation API Development with GraphQL and Prisma
Lambda architecture
Productionize spark structured streaming
Introduction to GraphQL

What's hot (20)

PPTX
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
PDF
Why UI Developers Love GraphQL - Sashko Stubailo, Apollo/Meteor
PDF
Intro to GraphQL
PPTX
The API Journey: from REST to GraphQL
PDF
Better APIs with GraphQL
PPTX
The API Journey: GraphQL Specification and Implementation
PPTX
CONDG April 23 2020 - Baskar Rao - GraphQL
PPTX
An intro to GraphQL
PDF
Selenium camp 2017. Alexander Chumakin
PDF
I/O intensiveなKafka ConsumerアプリケーションのスループットをLINE Ads Platformではどのように改善したか
PDF
GraphQL in an Age of REST
PDF
The Apollo and GraphQL Stack
PPTX
Elastic Stack Basic - All The Capabilities in 6.3!
PDF
Modern APIs with GraphQL
PPT
Graphql presentation
PPTX
GraphQL Introduction
PDF
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
PDF
Boost your APIs with GraphQL 1.0
PDF
GraphQL API on a Serverless Environment
PPTX
GraphQL, Redux, and React
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
Why UI Developers Love GraphQL - Sashko Stubailo, Apollo/Meteor
Intro to GraphQL
The API Journey: from REST to GraphQL
Better APIs with GraphQL
The API Journey: GraphQL Specification and Implementation
CONDG April 23 2020 - Baskar Rao - GraphQL
An intro to GraphQL
Selenium camp 2017. Alexander Chumakin
I/O intensiveなKafka ConsumerアプリケーションのスループットをLINE Ads Platformではどのように改善したか
GraphQL in an Age of REST
The Apollo and GraphQL Stack
Elastic Stack Basic - All The Capabilities in 6.3!
Modern APIs with GraphQL
Graphql presentation
GraphQL Introduction
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
Boost your APIs with GraphQL 1.0
GraphQL API on a Serverless Environment
GraphQL, Redux, and React
Ad

Similar to Building GraphQL Servers with Node.JS & Prisma (20)

PDF
GraphQL and its schema as a universal layer for database access
PDF
Camunda GraphQL Extension (09/2017 Berlin)
PDF
Building and deploying GraphQL Servers with AWS Lambda and Prisma I AWS Dev D...
PDF
React & GraphQL
PPTX
Introduction to Graph QL
PDF
GraphQL Bangkok meetup 5.0
PPTX
GraphQL_devoxx_2023.pptx
PDF
Sparking up Data Engineering: Spark Summit East talk by Rohan Sharma
PDF
Boost your APIs with GraphQL
PDF
Graphql usage
PPTX
GraphQL Introduction with Spring Boot
PDF
GraphQL across the stack: How everything fits together
PDF
Let's talk about GraphQL
PPTX
Kotlin REST & GraphQL API
PDF
Scaling Your Team With GraphQL: Why Relationships Matter
PDF
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
PPTX
GraphQL-ify your APIs
PDF
Exposing GraphQLs as Managed APIs
PDF
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
PDF
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
GraphQL and its schema as a universal layer for database access
Camunda GraphQL Extension (09/2017 Berlin)
Building and deploying GraphQL Servers with AWS Lambda and Prisma I AWS Dev D...
React & GraphQL
Introduction to Graph QL
GraphQL Bangkok meetup 5.0
GraphQL_devoxx_2023.pptx
Sparking up Data Engineering: Spark Summit East talk by Rohan Sharma
Boost your APIs with GraphQL
Graphql usage
GraphQL Introduction with Spring Boot
GraphQL across the stack: How everything fits together
Let's talk about GraphQL
Kotlin REST & GraphQL API
Scaling Your Team With GraphQL: Why Relationships Matter
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
GraphQL-ify your APIs
Exposing GraphQLs as Managed APIs
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
Ad

More from Nikolas Burk (11)

PDF
Managing GraphQL servers with AWS Fargate & Prisma Cloud
PDF
Building Serverless GraphQL Backends
PDF
GraphQL Subscriptions
PDF
The Serverless GraphQL Backend Architecture
PDF
State Management & Unidirectional Data Flow
PDF
Diving into GraphQL, React & Apollo
PDF
Authentication, Authorization & Error Handling with GraphQL
PDF
Getting Started with Relay Modern
PDF
Building a Realtime Chat with React Native (Expo) & GraphQL Subscriptions
PDF
Building a Realtime Chat with React & GraphQL Subscriptions
PDF
REST in Peace - Using GraphQL with Apollo on iOS
Managing GraphQL servers with AWS Fargate & Prisma Cloud
Building Serverless GraphQL Backends
GraphQL Subscriptions
The Serverless GraphQL Backend Architecture
State Management & Unidirectional Data Flow
Diving into GraphQL, React & Apollo
Authentication, Authorization & Error Handling with GraphQL
Getting Started with Relay Modern
Building a Realtime Chat with React Native (Expo) & GraphQL Subscriptions
Building a Realtime Chat with React & GraphQL Subscriptions
REST in Peace - Using GraphQL with Apollo on iOS

Recently uploaded (20)

PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Nekopoi APK 2025 free lastest update
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Essential Infomation Tech presentation.pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
top salesforce developer skills in 2025.pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
history of c programming in notes for students .pptx
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Digital Strategies for Manufacturing Companies
PPTX
Transform Your Business with a Software ERP System
PDF
How Creative Agencies Leverage Project Management Software.pdf
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Nekopoi APK 2025 free lastest update
Reimagine Home Health with the Power of Agentic AI​
Essential Infomation Tech presentation.pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
VVF-Customer-Presentation2025-Ver1.9.pptx
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
top salesforce developer skills in 2025.pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Odoo Companies in India – Driving Business Transformation.pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
history of c programming in notes for students .pptx
Internet Downloader Manager (IDM) Crack 6.42 Build 41
wealthsignaloriginal-com-DS-text-... (1).pdf
Digital Strategies for Manufacturing Companies
Transform Your Business with a Software ERP System
How Creative Agencies Leverage Project Management Software.pdf

Building GraphQL Servers with Node.JS & Prisma