SlideShare a Scribd company logo
BENJAMIN MORGAN | SENIOR DEVELOPER | ATLASSIAN | @BENEDWINMORGAN
Designing and Running a
GraphQL API
How do you build apis today?
REST
Why GraphQL?
Latency
Why GraphQL
MobileOver / Under fetching
/users/12345
{
"name": "Ben",
"dateOfBirth": "1/2/1930",
"hairColour": "Brown",
"shoeSize": {
"EU": "44"
},
"favouriteColour": "Grey",
"preferredIcecream": "Chocolate",
“floor": "8"
}
/users/12345
{
"name": "Ben",
"dateOfBirth": "1/2/1930",
"hairColour": "Brown",
"shoeSize": {
"EU": "44"
}
}
/users/12345/address
{
"number": "123",
"street": "george"
}
Latency
Mobile
What is GraphQL?
Is a query
language
GRAPHQL
{
person (id: 123) {
name
address {
street
}
}
}
{
person (id: 123) {
name
address {
street
}
}
}
{
"data": {
"person": {
"name": "Ben",
"address": {
"street": "George"
}
}
}
}
Schema Execution Engine
Components
type Person {
name: String
dateOfBirth: String
hairColour: String
address: Address
}
type Address {
number: String
street: String
}
type Query {
person(id: ID): Person
}
type Person {
name: String
dateOfBirth: String
hairColour: String
address: Address
}
type Address {
number: String
street: String
}
type Query {
person(id: ID): Person
}
type Person {
name: String
dateOfBirth: String
hairColour: String
address: Address
}
type Address {
number: String
street: String
}
type Query {
person(id: ID): Person
}
type Person {
name: String
dateOfBirth: String
hairColour: String
address: Address
}
type Address {
number: String
street: String
}
type Query {
person(id: ID): Person
}
Query parsing
Break the query up into fields
Data fetcher / resolvers
Fetch portions of the graph
Merge results
Merge the results of the fetch operations
Query parsing
Break the query up into entities
Data fetcher / resolvers
Fetch portions of the graph
Merge results
Merge the results of the fetch operations
Query parsing
Break the query up into entities
Data fetcher / resolvers
Fetch portions of the graph
Merge results
Merge the results of the fetch operations
Stick it on a HTTP path and
you’re done!
Design Patterns
Schema evolution
Pagination
Mutations
GraphQL is more flexible
Prefer types
Monitor schema usage
GraphQL is more flexible
Prefer types
Monitor schema usage
type Person {
name: String
dateOfBirth: String
hairColour: String
address: Address
}
type Address {
number: String
street: String
}
type Query {
person(id: ID): Person
}
type Person {
name: String
dateOfBirth: String
hairColour: String
address: Address
}
type Address {
number: String
street: String
}
type Query {
person(id: ID): Person
}
GraphQL is more flexible
Prefer types
Monitor schema usage
Schema evolution
Pagination
Mutations
Relay Cursor Specification
Connection and Node
PageInfo and Cursor
Relay Cursor Specification
Connection and Node
PageInfo and Cursor
Relay Cursor Specification
Connection and Node
PageInfo and Cursor
Schema evolution
Pagination
Mutations
No hierarchy
Use a single mandatory input object
Return the affected object
No hierarchy
Use a single mandatory input object
Return the affected object
No hierarchy
Use a single mandatory input object
Return the affected object
Running a service
Monitoring
Tracing
Access logging
"GET /hello/world HTTP/1.1" 200
"POST /user/create HTTP/1.1" 200
"POST /user/create HTTP/1.1" 500
"GET /group/report HTTP/1.1" 200
"DELETE /user/create HTTP/1.1" 500
"POST /graphql HTTP/1.1" 200
"POST /graphql HTTP/1.1" 200
"POST /graphql HTTP/1.1" 200
"POST /graphql HTTP/1.1" 200
"POST /graphql HTTP/1.1" 200
{
"data": {
},
"errors": [
{
"message": "No user found with name
'Ben'.",
"locations": [
{
}
],
"path": [
],
"extensions": {
}
}
]
}
{
"extensions": {
"status": [
400
],
"statusCode": 400,
"userMessage": "No user found with name
'Ben'."
}
}
Monitoring
Tracing
Access logging
"GET /hello/world HTTP/1.1" 200
"POST /user/create HTTP/1.1" 200
"POST /user/create HTTP/1.1" 500
"GET /group/report HTTP/1.1" 200
"DELETE /user/create HTTP/1.1" 500
"POST /graphql HTTP/1.1" 200
"POST /graphql HTTP/1.1" 200
"POST /graphql HTTP/1.1" 200
"POST /graphql HTTP/1.1" 200
"POST /graphql HTTP/1.1" 200
{
person (xxx) {
name
address {
street
}
}
}
"127.0.0.1 bmorgan "query {person…
Monitoring
Tracing
Access logging
Track performance by field not url
Not all fields are equal
Consider tooling such as apollo-tracing
Track performance by field not url
Not all fields are equal
Consider tooling such as apollo-tracing
Track performance by field not url
Not all fields are equal
Consider tooling such as apollo-tracing
{
"data": {
"person": {
...
},
"extensions": {
"tracing": {
"startTime" : 123,
...
"execution" : {
"resolvers": [...]
}
}
}
}
Schema Validation
Tooling
GatewaysGraphiQL
Designing and Running a GraphQL API
Schema Validation
Tooling
GatewaysGraphiQL
Schema Validation
Tooling
GatewaysGraphiQL
That is it!
Operating
Summary
ToolingDesigning
Projects and tools
GraphQL Foundation
Foundation that looks after the
GraphQL standard
Relay
Framework for GraphQL client
Apollo GraphQL
Platform and tooling for building
graphql APIs
GraphiQL
In browser query ide
graphql-java
Java Graphql framework
Designing and Running a GraphQL API
BENJAMIN MORGAN | SENIOR DEVELOPER | ATLASSIAN | @BENEDWINMORGAN
Thank you!

More Related Content

What's hot (20)

PDF
4 Changes We're Making to Help you be Successful in the Cloud
Atlassian
 
PDF
Trusted by Default: The Forge Security & Privacy Model
Atlassian
 
PDF
What's New in Jira Cloud for Developers
Atlassian
 
PDF
Declaring Server App Components in Pure Java
Atlassian
 
PDF
Building a Cerberus App Without Losing Our Heads: The Passage to a Cross-Plat...
Atlassian
 
PDF
How to Build a Better JIRA Add-on
Atlassian
 
PDF
Leaning into Server to Cloud App Migration
Atlassian
 
PDF
Integrate CI/CD Pipelines with Jira Software Cloud
Atlassian
 
PDF
Forge App Showcase
Atlassian
 
PDF
Updates on the Data Center Apps Program
Atlassian
 
PDF
How Bitbucket Pipelines Loads Connect UI Assets Super-fast
Atlassian
 
PDF
Spec-first API Design for Speed and Safety
Atlassian
 
PDF
The New & Improved Confluence Server and Data Center
Atlassian
 
PDF
Creating Your Own Server Add-on that Customizes Confluence or JIRA
Atlassian
 
PDF
Integration Testing on Steroids: Run Your Tests on the Real Things
Atlassian
 
PDF
What's New in AUI 8 and Why you Should Care!
Atlassian
 
PDF
Integrate CI/CD Pipelines with Jira Software Cloud
Atlassian
 
PDF
What Does Jira Next-Gen Mean for Cloud Apps?
Atlassian
 
PDF
What's New with Confluence Connect
Atlassian
 
PDF
Scaling Indexing and Replication in Jira Data Center Apps
Atlassian
 
4 Changes We're Making to Help you be Successful in the Cloud
Atlassian
 
Trusted by Default: The Forge Security & Privacy Model
Atlassian
 
What's New in Jira Cloud for Developers
Atlassian
 
Declaring Server App Components in Pure Java
Atlassian
 
Building a Cerberus App Without Losing Our Heads: The Passage to a Cross-Plat...
Atlassian
 
How to Build a Better JIRA Add-on
Atlassian
 
Leaning into Server to Cloud App Migration
Atlassian
 
Integrate CI/CD Pipelines with Jira Software Cloud
Atlassian
 
Forge App Showcase
Atlassian
 
Updates on the Data Center Apps Program
Atlassian
 
How Bitbucket Pipelines Loads Connect UI Assets Super-fast
Atlassian
 
Spec-first API Design for Speed and Safety
Atlassian
 
The New & Improved Confluence Server and Data Center
Atlassian
 
Creating Your Own Server Add-on that Customizes Confluence or JIRA
Atlassian
 
Integration Testing on Steroids: Run Your Tests on the Real Things
Atlassian
 
What's New in AUI 8 and Why you Should Care!
Atlassian
 
Integrate CI/CD Pipelines with Jira Software Cloud
Atlassian
 
What Does Jira Next-Gen Mean for Cloud Apps?
Atlassian
 
What's New with Confluence Connect
Atlassian
 
Scaling Indexing and Replication in Jira Data Center Apps
Atlassian
 

Similar to Designing and Running a GraphQL API (20)

PDF
Overview of GraphQL & Clients
Pokai Chang
 
PDF
Simplify Access to Data from Pivotal GemFire Using the GraphQL (G2QL) Extension
VMware Tanzu
 
PDF
GraphQL in Symfony
Bernd Alter
 
PDF
GraphQL Isn't An Excuse To Stop Writing Docs
Pronovix
 
PPTX
GraphQL API Gateway and microservices
Mohammed Shaban
 
PPTX
Graph QL Introduction
LivePerson
 
PDF
REST to GraphQL migration: Pros, cons and gotchas
Alexey Ivanov
 
PDF
Better APIs with GraphQL
Josh Price
 
PDF
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
Ruby Meditation
 
PPTX
GraphQL - The new "Lingua Franca" for API-Development
jexp
 
PPTX
Introduction to GraphQL
Rodrigo Prates
 
PDF
GraphQL the holy contract between client and server
Pavel Chertorogov
 
PDF
Let's start GraphQL: structure, behavior, and architecture
Andrii Gakhov
 
PPTX
Introduction to GraphQL
Bhargav Anadkat
 
PDF
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
Rob Crowley
 
PDF
20170624 GraphQL Presentation
Martin Heidegger
 
PPTX
Introduction to GraphQL Presentation.pptx
Knoldus Inc.
 
DOCX
GraphQL Advanced Concepts A Comprehensive Guide.docx
ssuser5583681
 
PDF
GraphQL with .NET Core Microservices.pdf
Knoldus Inc.
 
PDF
Graphql
Niv Ben David
 
Overview of GraphQL & Clients
Pokai Chang
 
Simplify Access to Data from Pivotal GemFire Using the GraphQL (G2QL) Extension
VMware Tanzu
 
GraphQL in Symfony
Bernd Alter
 
GraphQL Isn't An Excuse To Stop Writing Docs
Pronovix
 
GraphQL API Gateway and microservices
Mohammed Shaban
 
Graph QL Introduction
LivePerson
 
REST to GraphQL migration: Pros, cons and gotchas
Alexey Ivanov
 
Better APIs with GraphQL
Josh Price
 
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
Ruby Meditation
 
GraphQL - The new "Lingua Franca" for API-Development
jexp
 
Introduction to GraphQL
Rodrigo Prates
 
GraphQL the holy contract between client and server
Pavel Chertorogov
 
Let's start GraphQL: structure, behavior, and architecture
Andrii Gakhov
 
Introduction to GraphQL
Bhargav Anadkat
 
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
Rob Crowley
 
20170624 GraphQL Presentation
Martin Heidegger
 
Introduction to GraphQL Presentation.pptx
Knoldus Inc.
 
GraphQL Advanced Concepts A Comprehensive Guide.docx
ssuser5583681
 
GraphQL with .NET Core Microservices.pdf
Knoldus Inc.
 
Graphql
Niv Ben David
 
Ad

More from Atlassian (20)

PPTX
International Women's Day 2020
Atlassian
 
PDF
10 emerging trends that will unbreak your workplace in 2020
Atlassian
 
PDF
Let's Build an Editor Macro with Forge UI
Atlassian
 
PDF
Meet the Forge Runtime
Atlassian
 
PDF
Forge UI: A New Way to Customize the Atlassian User Experience
Atlassian
 
PDF
Observability and Troubleshooting in Forge
Atlassian
 
PDF
Designing Forge UI: A Story of Designing an App UI System
Atlassian
 
PDF
Design Your Next App with the Atlassian Vendor Sketch Plugin
Atlassian
 
PDF
Tear Up Your Roadmap and Get Out of the Building
Atlassian
 
PDF
Nailing Measurement: a Framework for Measuring Metrics that Matter
Atlassian
 
PDF
Building Apps With Color Blind Users in Mind
Atlassian
 
PDF
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Atlassian
 
PDF
Beyond Diversity: A Guide to Building Balanced Teams
Atlassian
 
PDF
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
Atlassian
 
PDF
Building Apps With Enterprise in Mind
Atlassian
 
PDF
Shipping With Velocity and Confidence Using Feature Flags
Atlassian
 
PDF
Build With Heart and Balance, Remote Work Edition
Atlassian
 
PDF
How to Grow an Atlassian App Worthy of Top Vendor Status
Atlassian
 
PDF
Monitoring As Code: How to Integrate App Monitoring Into Your Developer Cycle
Atlassian
 
PDF
How to Market Your New App on the Atlassian Marketplace
Atlassian
 
International Women's Day 2020
Atlassian
 
10 emerging trends that will unbreak your workplace in 2020
Atlassian
 
Let's Build an Editor Macro with Forge UI
Atlassian
 
Meet the Forge Runtime
Atlassian
 
Forge UI: A New Way to Customize the Atlassian User Experience
Atlassian
 
Observability and Troubleshooting in Forge
Atlassian
 
Designing Forge UI: A Story of Designing an App UI System
Atlassian
 
Design Your Next App with the Atlassian Vendor Sketch Plugin
Atlassian
 
Tear Up Your Roadmap and Get Out of the Building
Atlassian
 
Nailing Measurement: a Framework for Measuring Metrics that Matter
Atlassian
 
Building Apps With Color Blind Users in Mind
Atlassian
 
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Atlassian
 
Beyond Diversity: A Guide to Building Balanced Teams
Atlassian
 
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
Atlassian
 
Building Apps With Enterprise in Mind
Atlassian
 
Shipping With Velocity and Confidence Using Feature Flags
Atlassian
 
Build With Heart and Balance, Remote Work Edition
Atlassian
 
How to Grow an Atlassian App Worthy of Top Vendor Status
Atlassian
 
Monitoring As Code: How to Integrate App Monitoring Into Your Developer Cycle
Atlassian
 
How to Market Your New App on the Atlassian Marketplace
Atlassian
 
Ad

Recently uploaded (20)

PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 

Designing and Running a GraphQL API