SlideShare a Scribd company logo
Managing GraphQL servers
with AWS Fargate & Prisma Cloud
@nikolasburk
Nikolas Burk
Based in Berlin
Developer at @prisma
@nikolasburk@nikolasburk
GraphQL introduction
Core mechanis of a GraphQL server
Building GraphQL servers with Prisma
Managing GraphQL servers with AWS
Fargate & Prisma Cloud
Agenda
1
2
3
4
@nikolasburk
Introduction
@nikolasburk
What is GraphQL?
New API standard developed by Facebook
Specficiation for type system & query language
Core primitives: Query, Mutation & Subscription
Why use GraphQL?
Strongly typed schema for your API
Query exactly the data you need
Rich ecosystem, smooth workflows and
great community
query {
user(id: “user123”) {
name
posts {
title
}
}
}
HTTP POST
{
"data" :{
"user": {
"name": "Sarah",
"posts": [
{ "title": "Join us for GraphQL Europe" },
{ "title": "GraphQL is the future of APIs" },
]
}
}
}
Learn more 💡
https://blog.graph.cool/b60cfa683511
Top 5 Reasons To Use GraphQL
https://www.howtographql.com/basics/0-introduction/
GraphQL Introduction
@nikolasburk
Core mechanics of a
GraphQL server
@nikolasburk
Structure: The GraphQL Schema
Behaviour: Resolver functions
Setup: Engine, Server/Network, Middlewares…
3 parts of a GraphQL server
1
2
3
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
Example: Hello World
type Query {
hello: String!
}
GRAPHQL SCHEMA
query {
hello
}
QUERY
{
“hello”: “Hello World”
}
RESPONSE
type User {
id: ID!
name: String!
}
type Query {
user(id: ID!): User
users: [User!]!
}
type Mutation {
createUser(name: String!): User!
updateUser(id: ID!, anme: String!): User
deleteUser(id: ID!): User
}
Example: CRUD for User type
type User {
id: ID!
name: String!
}
type Query {
user(id: ID!): User
users: [User!]!
}
type Mutation {
createUser(name: String!): User!
updateUser(id: ID!, anme: String!): User
deleteUser(id: ID!): User
}
query {
user(id: “user123”) {
name
}
}
{
“user”: {
“name”: “Sarah”
}
}
Example: CRUD for User type
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
type Query {
hello: String!
}
GRAPHQL SCHEMA
const resolvers = {
Query: {
hello: () => `Hello World`
}
}
RESOLVER FUNCTIONS
Example: Hello World
GRAPHQL SCHEMA
type Query {
user(id: ID!): User
users: [User!]!
}
type Mutation {
createUser(name: String!): User!
updateUser(id: ID!, anme: String!): User
deleteUser(id: ID!): User
}
type User {
id: ID!
name: String!
}
RESOLVER FUNCTIONS
const resolvers = {
Query: {
user: (root, args) => db.getUser(args.id),
users: () => db.getUsers()
},
Mutation: {
createUser: (root, args) =>
db.createUser(args.name),
updateUser: (root, args) =>
db.updateUser(args.id, args.name),
deleteUser: (root, args) =>
db.deleteUser(args.id),
},
User: {
id: (root) => root.id,
name: (root) => root.name
}
}
Example: CRUD for User type
3 Setup
"GraphQL engine" to orchestrate resolver invocations
Network layer based on "graphql-yoga" (network
configuration: port, endpoints, CORS … )
Middleware (analytics, logging, crash reporting … )
import { GraphQLServer } from 'graphql-yoga'
const typeDefs = `
type Query {
hello: String!
}
`
const resolvers = {
Query: {
hello: () => `Hello World`
}
}
const server = new GraphQLServer({
typeDefs,
resolvers
})
server.start(() => console.log(`Server is running on port 4000`))
RESOLVERS
SCHEMA
SETUP
…putting it all together
import { GraphQLServer } from 'graphql-yoga'
const typeDefs = `
type Query {
hello: String!
}
`
const resolvers = {
Query: {
hello: () => `Hello World`
}
}
const server = new GraphQLServer({
typeDefs,
resolvers
})
server.start(() => console.log(`Server is running on port 4000`))
RESOLVERS
SCHEMA
SETUP
…putting it all together
import { GraphQLServer } from 'graphql-yoga'
const typeDefs = `
type Query {
hello: String!
}
`
const resolvers = {
Query: {
hello: () => `Hello World`
}
}
const server = new GraphQLServer({
typeDefs,
resolvers
})
server.start(() => console.log(`Server is running on port 4000`))
RESOLVERS
SCHEMA
SETUP
…putting it all together
import { GraphQLServer } from 'graphql-yoga'
const typeDefs = `
type Query {
hello: String!
}
`
const resolvers = {
Query: {
hello: () => `Hello World`
}
}
const server = new GraphQLServer({
typeDefs,
resolvers
})
server.start(() => console.log(`Server is running on port 4000`))
RESOLVERS
SCHEMA
SETUP
…putting it all together
Learn more 💡
https://blog.graph.cool/ac5e2950214e
GraphQL Server Basics - The Schema
https://www.howtographql.com/graphql-js/0-introduction/
GraphQL Server Tutorial
@nikolasburk
🍿 Demo 1
Building GraphQL servers
with Prisma
@nikolasburk
Architecture
Client API Server DatabasePrisma
(based on Docker)
DB-agnostic Data Access Layer (think ORM)
Prisma turns your DB into a GraphQL API
Your API server delegates queries to Prisma
Prisma
Learn more 💡
https://www/prisma.io/docs/quickstart
Prisma Quickstart
https://www.prisma.io/docs/reference/-apohpae9ju
What is Prisma?
@nikolasburk
🍿 Demo 2
Managing GraphQL servers
with AWS Fargate & Prisma Cloud
@nikolasburk
Web app to manage Prisma servers
OSS Prisma & Prisma Cloud
OSS Prisma = Abstraction
Prisma Cloud = Workflows
Prisma Cloud
Learn more 💡
https://www.prisma.io/docs/tutorials/-joofei3ahd
Deploy a Prisma server to AWS Fargate
@nikolasburk
🍿 Demo 3
Managing GraphQL servers  with AWS Fargate & Prisma Cloud
Managing GraphQL servers  with AWS Fargate & Prisma Cloud
Thank you 🙏
@nikolasburk@nikolasburk

More Related Content

PDF
Code-first GraphQL Server Development with Prisma
PDF
GraphQL & Prisma from Scratch
PDF
Next-generation API Development with GraphQL and Prisma
PPTX
Sharding and Load Balancing in Scala - Twitter's Finagle
PDF
JavaOne 2013: Java 8 - The Good Parts
PDF
Practical RxJava for Android
PDF
FullStack Reativo com Spring WebFlux + Angular
PDF
Angular for Java Enterprise Developers: Oracle Code One 2018
Code-first GraphQL Server Development with Prisma
GraphQL & Prisma from Scratch
Next-generation API Development with GraphQL and Prisma
Sharding and Load Balancing in Scala - Twitter's Finagle
JavaOne 2013: Java 8 - The Good Parts
Practical RxJava for Android
FullStack Reativo com Spring WebFlux + Angular
Angular for Java Enterprise Developers: Oracle Code One 2018

What's hot (20)

PDF
非同期javascriptの過去と未来
PDF
Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019
PDF
GraphQL Schema Stitching with Prisma & Contentful
PPTX
Typescript barcelona
PDF
Cycle.js - A functional reactive UI framework
PDF
Cycle.js - Functional reactive UI framework (Nikos Kalogridis)
PDF
Intro to RxJava/RxAndroid - GDG Munich Android
PDF
Full-Stack Reativo com Spring WebFlux + Angular - FiqueEmCasaConf
PDF
Serverless Angular, Material, Firebase and Google Cloud applications
PDF
ActiveRecord Query Interface
PDF
Full-Stack Reactive with Spring WebFlux + Angular - Oracle Code One 2018
PPTX
Rxjs swetugg
PPTX
Rxjs ngvikings
PDF
Javascript Promises/Q Library
PPTX
Code generation with javac plugin
PDF
Retrofit
PDF
V8 javascript engine for フロントエンドデベロッパー
PPTX
Top 10 RxJs Operators in Angular
PDF
Auto-GWT : Better GWT Programming with Xtend
ODP
Agile web development Groovy Grails with Netbeans
非同期javascriptの過去と未来
Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019
GraphQL Schema Stitching with Prisma & Contentful
Typescript barcelona
Cycle.js - A functional reactive UI framework
Cycle.js - Functional reactive UI framework (Nikos Kalogridis)
Intro to RxJava/RxAndroid - GDG Munich Android
Full-Stack Reativo com Spring WebFlux + Angular - FiqueEmCasaConf
Serverless Angular, Material, Firebase and Google Cloud applications
ActiveRecord Query Interface
Full-Stack Reactive with Spring WebFlux + Angular - Oracle Code One 2018
Rxjs swetugg
Rxjs ngvikings
Javascript Promises/Q Library
Code generation with javac plugin
Retrofit
V8 javascript engine for フロントエンドデベロッパー
Top 10 RxJs Operators in Angular
Auto-GWT : Better GWT Programming with Xtend
Agile web development Groovy Grails with Netbeans
Ad

Similar to Managing GraphQL servers with AWS Fargate & Prisma Cloud (20)

PDF
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and Typescript
PDF
MongoDB World 2019: Building a GraphQL API with MongoDB, Prisma, & TypeScript
PDF
REST to GraphQL migration: Pros, cons and gotchas
PDF
Performant APIs with GraphQL and PHP (Dutch PHP 2019)
PDF
Simplify Access to Data from Pivotal GemFire Using the GraphQL (G2QL) Extension
PDF
Graphql usage
PDF
Nikita Galkin "Looking for the right tech stack for GraphQL application"
PPTX
Building a GraphQL API in PHP
PDF
Tutorial: Building a GraphQL API in PHP
PDF
Graphql with Flamingo
PDF
[2019-07] GraphQL in depth (serverside)
PDF
GraphQL and its schema as a universal layer for database access
PDF
APIdays Paris 2018 - Building scalable, type-safe GraphQL servers from scratc...
PDF
GraphQL - when REST API is not enough - lessons learned
PDF
Overview of GraphQL & Clients
PDF
GraphQL API in Clojure
PDF
Your API on Steroids - Retrofitting GraphQL by Code, Cloud Native or Serverless
PPTX
GraphQL - an elegant weapon... for more civilized age
PDF
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
PDF
Introduction to kotlin
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and Typescript
MongoDB World 2019: Building a GraphQL API with MongoDB, Prisma, & TypeScript
REST to GraphQL migration: Pros, cons and gotchas
Performant APIs with GraphQL and PHP (Dutch PHP 2019)
Simplify Access to Data from Pivotal GemFire Using the GraphQL (G2QL) Extension
Graphql usage
Nikita Galkin "Looking for the right tech stack for GraphQL application"
Building a GraphQL API in PHP
Tutorial: Building a GraphQL API in PHP
Graphql with Flamingo
[2019-07] GraphQL in depth (serverside)
GraphQL and its schema as a universal layer for database access
APIdays Paris 2018 - Building scalable, type-safe GraphQL servers from scratc...
GraphQL - when REST API is not enough - lessons learned
Overview of GraphQL & Clients
GraphQL API in Clojure
Your API on Steroids - Retrofitting GraphQL by Code, Cloud Native or Serverless
GraphQL - an elegant weapon... for more civilized age
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Introduction to kotlin
Ad

More from Nikolas Burk (13)

PDF
Building GraphQL Servers with Node.JS & Prisma
PDF
The GraphQL Ecosystem in 2018
PDF
React & GraphQL
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
Building GraphQL Servers with Node.JS & Prisma
The GraphQL Ecosystem in 2018
React & GraphQL
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
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Nekopoi APK 2025 free lastest update
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
AI in Product Development-omnex systems
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
System and Network Administraation Chapter 3
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
Upgrade and Innovation Strategies for SAP ERP Customers
Which alternative to Crystal Reports is best for small or large businesses.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
VVF-Customer-Presentation2025-Ver1.9.pptx
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Design an Analysis of Algorithms I-SECS-1021-03
Nekopoi APK 2025 free lastest update
Design an Analysis of Algorithms II-SECS-1021-03
AI in Product Development-omnex systems
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
2025 Textile ERP Trends: SAP, Odoo & Oracle
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
CHAPTER 2 - PM Management and IT Context
Softaken Excel to vCard Converter Software.pdf
PTS Company Brochure 2025 (1).pdf.......
System and Network Administraation Chapter 3
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
How to Choose the Right IT Partner for Your Business in Malaysia
Navsoft: AI-Powered Business Solutions & Custom Software Development

Managing GraphQL servers with AWS Fargate & Prisma Cloud

  • 1. Managing GraphQL servers with AWS Fargate & Prisma Cloud @nikolasburk
  • 2. Nikolas Burk Based in Berlin Developer at @prisma @nikolasburk@nikolasburk
  • 3. GraphQL introduction Core mechanis of a GraphQL server Building GraphQL servers with Prisma Managing GraphQL servers with AWS Fargate & Prisma Cloud Agenda 1 2 3 4 @nikolasburk
  • 5. What is GraphQL? New API standard developed by Facebook Specficiation for type system & query language Core primitives: Query, Mutation & Subscription
  • 6. Why use GraphQL? Strongly typed schema for your API Query exactly the data you need Rich ecosystem, smooth workflows and great community
  • 7. query { user(id: “user123”) { name posts { title } } } HTTP POST { "data" :{ "user": { "name": "Sarah", "posts": [ { "title": "Join us for GraphQL Europe" }, { "title": "GraphQL is the future of APIs" }, ] } } }
  • 8. Learn more 💡 https://blog.graph.cool/b60cfa683511 Top 5 Reasons To Use GraphQL https://www.howtographql.com/basics/0-introduction/ GraphQL Introduction @nikolasburk
  • 9. Core mechanics of a GraphQL server @nikolasburk
  • 10. Structure: The GraphQL Schema Behaviour: Resolver functions Setup: Engine, Server/Network, Middlewares… 3 parts of a GraphQL server 1 2 3
  • 11. 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
  • 12. Example: Hello World type Query { hello: String! } GRAPHQL SCHEMA query { hello } QUERY { “hello”: “Hello World” } RESPONSE
  • 13. type User { id: ID! name: String! } type Query { user(id: ID!): User users: [User!]! } type Mutation { createUser(name: String!): User! updateUser(id: ID!, anme: String!): User deleteUser(id: ID!): User } Example: CRUD for User type
  • 14. type User { id: ID! name: String! } type Query { user(id: ID!): User users: [User!]! } type Mutation { createUser(name: String!): User! updateUser(id: ID!, anme: String!): User deleteUser(id: ID!): User } query { user(id: “user123”) { name } } { “user”: { “name”: “Sarah” } } Example: CRUD for User type
  • 15. 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
  • 16. type Query { hello: String! } GRAPHQL SCHEMA const resolvers = { Query: { hello: () => `Hello World` } } RESOLVER FUNCTIONS Example: Hello World
  • 17. GRAPHQL SCHEMA type Query { user(id: ID!): User users: [User!]! } type Mutation { createUser(name: String!): User! updateUser(id: ID!, anme: String!): User deleteUser(id: ID!): User } type User { id: ID! name: String! } RESOLVER FUNCTIONS const resolvers = { Query: { user: (root, args) => db.getUser(args.id), users: () => db.getUsers() }, Mutation: { createUser: (root, args) => db.createUser(args.name), updateUser: (root, args) => db.updateUser(args.id, args.name), deleteUser: (root, args) => db.deleteUser(args.id), }, User: { id: (root) => root.id, name: (root) => root.name } } Example: CRUD for User type
  • 18. 3 Setup "GraphQL engine" to orchestrate resolver invocations Network layer based on "graphql-yoga" (network configuration: port, endpoints, CORS … ) Middleware (analytics, logging, crash reporting … )
  • 19. import { GraphQLServer } from 'graphql-yoga' const typeDefs = ` type Query { hello: String! } ` const resolvers = { Query: { hello: () => `Hello World` } } const server = new GraphQLServer({ typeDefs, resolvers }) server.start(() => console.log(`Server is running on port 4000`)) RESOLVERS SCHEMA SETUP …putting it all together
  • 20. import { GraphQLServer } from 'graphql-yoga' const typeDefs = ` type Query { hello: String! } ` const resolvers = { Query: { hello: () => `Hello World` } } const server = new GraphQLServer({ typeDefs, resolvers }) server.start(() => console.log(`Server is running on port 4000`)) RESOLVERS SCHEMA SETUP …putting it all together
  • 21. import { GraphQLServer } from 'graphql-yoga' const typeDefs = ` type Query { hello: String! } ` const resolvers = { Query: { hello: () => `Hello World` } } const server = new GraphQLServer({ typeDefs, resolvers }) server.start(() => console.log(`Server is running on port 4000`)) RESOLVERS SCHEMA SETUP …putting it all together
  • 22. import { GraphQLServer } from 'graphql-yoga' const typeDefs = ` type Query { hello: String! } ` const resolvers = { Query: { hello: () => `Hello World` } } const server = new GraphQLServer({ typeDefs, resolvers }) server.start(() => console.log(`Server is running on port 4000`)) RESOLVERS SCHEMA SETUP …putting it all together
  • 23. Learn more 💡 https://blog.graph.cool/ac5e2950214e GraphQL Server Basics - The Schema https://www.howtographql.com/graphql-js/0-introduction/ GraphQL Server Tutorial @nikolasburk
  • 25. Building GraphQL servers with Prisma @nikolasburk
  • 26. Architecture Client API Server DatabasePrisma (based on Docker)
  • 27. DB-agnostic Data Access Layer (think ORM) Prisma turns your DB into a GraphQL API Your API server delegates queries to Prisma Prisma
  • 28. Learn more 💡 https://www/prisma.io/docs/quickstart Prisma Quickstart https://www.prisma.io/docs/reference/-apohpae9ju What is Prisma? @nikolasburk
  • 30. Managing GraphQL servers with AWS Fargate & Prisma Cloud @nikolasburk
  • 31. Web app to manage Prisma servers OSS Prisma & Prisma Cloud OSS Prisma = Abstraction Prisma Cloud = Workflows Prisma Cloud