SlideShare a Scribd company logo
1 of 16
Introduction to GraphQL
@mdlavin from @LifeOmic
RVA Javascript 2019 - @mdlavin
Why GraphQL? Seriously.
I’m not selling GraphQL tools and
I’ve seen both in my development
Speed up development
Reduce web/mobile latency
RVA Javascript 2019 - @mdlavin
Why GraphQL?
On the client
• Great development tools for
prototyping
On the server
• No need to implement one-off
endpoints
• Great frameworks
Speed up development
Reduce web/mobile latency
RVA Javascript 2019 - @mdlavin
Why GraphQL?
On the client
• Request just the data needed
• Avoid multiple requests
On the server
• Compute and serialize only want
the client requests
Speed up development
Reduce web/mobile latency
RVA Javascript 2019 - @mdlavin
Compared to REST
REST
• Many URLs
• The URL that is requested designates
the data to be returned
• Fixed response attributes
• The result is always the same for each
type of URL*
GraphQL
• Single URL
• The same URL is used for all request
requests
• Dynamic response attributes
• The result includes only the data that is
requested
RVA Javascript 2019 - @mdlavin
Queries
• The client describes what it wants
• Either a Query or a Mutation
RVA Javascript 2019 - @mdlavin
Sample Queries
Request
POST /graphql
query GetBreweries {
breweries { name }
}
Response
{
data: {
breweries: [
{ name: “The Answer” },
{ name: “Triple Crossing” }
]
}
errors: []
}
RVA Javascript 2019 - @mdlavin
Schemas
• The API contract between the client and server
• Strictly typed
• Facilitates great tools
RVA Javascript 2019 - @mdlavin
Sample Schema
type Brewery {
name: String!
}
type Query {
breweries: [Brewery!]!
breweryByName(name: String!): Brewery
}
RVA Javascript 2019 - @mdlavin
Types
• The building blocks of a Schema
• Complex Types
RVA Javascript 2019 - @mdlavin
Samples Types
type Brewery {
name: String!
taps: Int!
beers(type Type): [Beer!]!
}
enum Type {
IPA SOUR STOUT
}
type Beer {
id: ID!
name: String!
ABV: Float!
type: Type
}
RVA Javascript 2019 - @mdlavin
Resolvers
• Teach the server how to compute each value
• Implementation detail
• Structure allows optimal composition and computation
22 November 2019
Sample Resolver
{
beers: async (parent: Brewery, args: Args, context: Context) => {
const beers = await context.storage.lookupBeers(parent.id);
const filteredBeers = beers.filter(beer => beer.type === args.type)
return filteredBeers;
}
}
RVA Javascript 2019 - @mdlavin
Live Coding!
React + Node built with Apollo
RVA Javascript 2019 - @mdlavin
Advanced features
Queries
Deferred results
Partial results
Types
Interfaces
Custom scalars
Schemas
Directives
Stitching
Codegen
GraphQL + TypeScript
RVA Javascript 2019 - @mdlavin
Questions?
.. or in person after
…or on twitter @mdlavin
RVA Javascript 2019 - @mdlavin

More Related Content

What's hot

«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​
«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​
«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​FDConf
 
SPSNL16 - Building Office 365 and SharePoint solutions using modern developer...
SPSNL16 - Building Office 365 and SharePoint solutions using modern developer...SPSNL16 - Building Office 365 and SharePoint solutions using modern developer...
SPSNL16 - Building Office 365 and SharePoint solutions using modern developer...Waldek Mastykarz
 
Can you build a Intranet with Modern SharePoint
Can you build a Intranet with Modern SharePointCan you build a Intranet with Modern SharePoint
Can you build a Intranet with Modern SharePointKnut Relbe-Moe [MVP, MCT]
 
Into to GraphQL
Into to GraphQLInto to GraphQL
Into to GraphQLshobot
 
Yasgui: not just another sparql gui
Yasgui: not just another sparql guiYasgui: not just another sparql gui
Yasgui: not just another sparql guilaurensrietveld
 
[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...
[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...
[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...DevDay.org
 
Web api using rest based architecture
Web api using rest based architectureWeb api using rest based architecture
Web api using rest based architectureSoham Kulkarni
 
How to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elementsHow to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elementsMarcellKiss7
 
Performance optimisation with GraphQL
Performance optimisation with GraphQLPerformance optimisation with GraphQL
Performance optimisation with GraphQLyann_s
 
Product Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical SkillsProduct Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical SkillsSandeep Adwankar
 
The Grail: React based Isomorph apps framework
The Grail: React based Isomorph apps frameworkThe Grail: React based Isomorph apps framework
The Grail: React based Isomorph apps frameworkEldar Djafarov
 
GraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer toolsGraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer toolsSashko Stubailo
 
Rencore Webinar: SharePoint Customizations - the most overlooked road block t...
Rencore Webinar: SharePoint Customizations - the most overlooked road block t...Rencore Webinar: SharePoint Customizations - the most overlooked road block t...
Rencore Webinar: SharePoint Customizations - the most overlooked road block t...Rencore
 
Server and client rendering of single page apps
Server and client rendering of single page appsServer and client rendering of single page apps
Server and client rendering of single page appsThomas Heymann
 
ruby on rails development company in india
ruby on rails development company in indiaruby on rails development company in india
ruby on rails development company in indiaSAG IPL
 
GraphQL across the stack: How everything fits together
GraphQL across the stack: How everything fits togetherGraphQL across the stack: How everything fits together
GraphQL across the stack: How everything fits togetherSashko Stubailo
 
Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4Yuriy Shapovalov
 
VTi Knowledge Database: a LinkedData project
VTi Knowledge Database: a LinkedData projectVTi Knowledge Database: a LinkedData project
VTi Knowledge Database: a LinkedData projectTom Klaasen
 

What's hot (20)

«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​
«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​
«Разрушаем Вавилонскую Башню WWW с помощью веб-компонент»​
 
SPSNL16 - Building Office 365 and SharePoint solutions using modern developer...
SPSNL16 - Building Office 365 and SharePoint solutions using modern developer...SPSNL16 - Building Office 365 and SharePoint solutions using modern developer...
SPSNL16 - Building Office 365 and SharePoint solutions using modern developer...
 
Can you build a Intranet with Modern SharePoint
Can you build a Intranet with Modern SharePointCan you build a Intranet with Modern SharePoint
Can you build a Intranet with Modern SharePoint
 
Into to GraphQL
Into to GraphQLInto to GraphQL
Into to GraphQL
 
Yasgui: not just another sparql gui
Yasgui: not just another sparql guiYasgui: not just another sparql gui
Yasgui: not just another sparql gui
 
[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...
[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...
[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...
 
WEBridge 4 EBS ( Windchill and Oracle EBS Integration )
WEBridge 4 EBS ( Windchill and Oracle EBS Integration )WEBridge 4 EBS ( Windchill and Oracle EBS Integration )
WEBridge 4 EBS ( Windchill and Oracle EBS Integration )
 
Web api using rest based architecture
Web api using rest based architectureWeb api using rest based architecture
Web api using rest based architecture
 
How to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elementsHow to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elements
 
WordPress: React Way
WordPress: React WayWordPress: React Way
WordPress: React Way
 
Performance optimisation with GraphQL
Performance optimisation with GraphQLPerformance optimisation with GraphQL
Performance optimisation with GraphQL
 
Product Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical SkillsProduct Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical Skills
 
The Grail: React based Isomorph apps framework
The Grail: React based Isomorph apps frameworkThe Grail: React based Isomorph apps framework
The Grail: React based Isomorph apps framework
 
GraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer toolsGraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer tools
 
Rencore Webinar: SharePoint Customizations - the most overlooked road block t...
Rencore Webinar: SharePoint Customizations - the most overlooked road block t...Rencore Webinar: SharePoint Customizations - the most overlooked road block t...
Rencore Webinar: SharePoint Customizations - the most overlooked road block t...
 
Server and client rendering of single page apps
Server and client rendering of single page appsServer and client rendering of single page apps
Server and client rendering of single page apps
 
ruby on rails development company in india
ruby on rails development company in indiaruby on rails development company in india
ruby on rails development company in india
 
GraphQL across the stack: How everything fits together
GraphQL across the stack: How everything fits togetherGraphQL across the stack: How everything fits together
GraphQL across the stack: How everything fits together
 
Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4
 
VTi Knowledge Database: a LinkedData project
VTi Knowledge Database: a LinkedData projectVTi Knowledge Database: a LinkedData project
VTi Knowledge Database: a LinkedData project
 

Similar to Introduction to GraphQL - RVA JavaScript 2019

CONDG April 23 2020 - Baskar Rao - GraphQL
CONDG April 23 2020 - Baskar Rao - GraphQLCONDG April 23 2020 - Baskar Rao - GraphQL
CONDG April 23 2020 - Baskar Rao - GraphQLMatthew Groves
 
Deploying GraphQL Services as Managed APIs
Deploying GraphQL Services as Managed APIsDeploying GraphQL Services as Managed APIs
Deploying GraphQL Services as Managed APIsWSO2
 
Angular App Presentation
Angular App PresentationAngular App Presentation
Angular App PresentationElizabeth Long
 
Your API on Steroids
Your API on Steroids Your API on Steroids
Your API on Steroids QAware GmbH
 
Deployment of DevOps Environment with CA Solutions
Deployment of DevOps Environment with CA SolutionsDeployment of DevOps Environment with CA Solutions
Deployment of DevOps Environment with CA SolutionsNic Swart
 
Serverless Days Milano - Developing Serverless applications with GraphQL
Serverless Days Milano - Developing Serverless applications with GraphQLServerless Days Milano - Developing Serverless applications with GraphQL
Serverless Days Milano - Developing Serverless applications with GraphQLMarcia Villalba
 
Marcia Villalba "Developing Serverless Applications with GraphQL"
Marcia Villalba "Developing Serverless Applications with GraphQL"Marcia Villalba "Developing Serverless Applications with GraphQL"
Marcia Villalba "Developing Serverless Applications with GraphQL"Fwdays
 
Modern APIs with GraphQL
Modern APIs with GraphQLModern APIs with GraphQL
Modern APIs with GraphQLTaikai
 
Web Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureWeb Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureToru Kawamura
 
SQLAnywhere 16.0 and Odata
SQLAnywhere 16.0 and OdataSQLAnywhere 16.0 and Odata
SQLAnywhere 16.0 and OdataSAP Technology
 
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)Rob Crowley
 
Getting Started with Spring for GraphQL
Getting Started with Spring for GraphQLGetting Started with Spring for GraphQL
Getting Started with Spring for GraphQLVMware Tanzu
 
GraphQL and its schema as a universal layer for database access
GraphQL and its schema as a universal layer for database accessGraphQL and its schema as a universal layer for database access
GraphQL and its schema as a universal layer for database accessConnected Data World
 
Web Access the Realm with GraphQL
Web Access the Realm with GraphQLWeb Access the Realm with GraphQL
Web Access the Realm with GraphQLKnoldus Inc.
 
Exposing GraphQLs as Managed APIs
Exposing GraphQLs as Managed APIsExposing GraphQLs as Managed APIs
Exposing GraphQLs as Managed APIsWSO2
 
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...apidays
 
Scribe online 03 scribe online cdk and api overview
Scribe online 03   scribe online cdk and api overviewScribe online 03   scribe online cdk and api overview
Scribe online 03 scribe online cdk and api overviewScribe Software Corp.
 
Client side performance analysis
Client side performance analysisClient side performance analysis
Client side performance analysisTsimafei Avilin
 

Similar to Introduction to GraphQL - RVA JavaScript 2019 (20)

CONDG April 23 2020 - Baskar Rao - GraphQL
CONDG April 23 2020 - Baskar Rao - GraphQLCONDG April 23 2020 - Baskar Rao - GraphQL
CONDG April 23 2020 - Baskar Rao - GraphQL
 
Deploying GraphQL Services as Managed APIs
Deploying GraphQL Services as Managed APIsDeploying GraphQL Services as Managed APIs
Deploying GraphQL Services as Managed APIs
 
Angular App Presentation
Angular App PresentationAngular App Presentation
Angular App Presentation
 
Your API on Steroids
Your API on Steroids Your API on Steroids
Your API on Steroids
 
Deployment of DevOps Environment with CA Solutions
Deployment of DevOps Environment with CA SolutionsDeployment of DevOps Environment with CA Solutions
Deployment of DevOps Environment with CA Solutions
 
Serverless Days Milano - Developing Serverless applications with GraphQL
Serverless Days Milano - Developing Serverless applications with GraphQLServerless Days Milano - Developing Serverless applications with GraphQL
Serverless Days Milano - Developing Serverless applications with GraphQL
 
Ajax World West
Ajax World WestAjax World West
Ajax World West
 
Marcia Villalba "Developing Serverless Applications with GraphQL"
Marcia Villalba "Developing Serverless Applications with GraphQL"Marcia Villalba "Developing Serverless Applications with GraphQL"
Marcia Villalba "Developing Serverless Applications with GraphQL"
 
Modern APIs with GraphQL
Modern APIs with GraphQLModern APIs with GraphQL
Modern APIs with GraphQL
 
Web Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureWeb Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the future
 
SQLAnywhere 16.0 and Odata
SQLAnywhere 16.0 and OdataSQLAnywhere 16.0 and Odata
SQLAnywhere 16.0 and Odata
 
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
 
GraphQL.net
GraphQL.netGraphQL.net
GraphQL.net
 
Getting Started with Spring for GraphQL
Getting Started with Spring for GraphQLGetting Started with Spring for GraphQL
Getting Started with Spring for GraphQL
 
GraphQL and its schema as a universal layer for database access
GraphQL and its schema as a universal layer for database accessGraphQL and its schema as a universal layer for database access
GraphQL and its schema as a universal layer for database access
 
Web Access the Realm with GraphQL
Web Access the Realm with GraphQLWeb Access the Realm with GraphQL
Web Access the Realm with GraphQL
 
Exposing GraphQLs as Managed APIs
Exposing GraphQLs as Managed APIsExposing GraphQLs as Managed APIs
Exposing GraphQLs as Managed APIs
 
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...
 
Scribe online 03 scribe online cdk and api overview
Scribe online 03   scribe online cdk and api overviewScribe online 03   scribe online cdk and api overview
Scribe online 03 scribe online cdk and api overview
 
Client side performance analysis
Client side performance analysisClient side performance analysis
Client side performance analysis
 

Recently uploaded

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 

Recently uploaded (20)

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 

Introduction to GraphQL - RVA JavaScript 2019

  • 1. Introduction to GraphQL @mdlavin from @LifeOmic RVA Javascript 2019 - @mdlavin
  • 2. Why GraphQL? Seriously. I’m not selling GraphQL tools and I’ve seen both in my development Speed up development Reduce web/mobile latency RVA Javascript 2019 - @mdlavin
  • 3. Why GraphQL? On the client • Great development tools for prototyping On the server • No need to implement one-off endpoints • Great frameworks Speed up development Reduce web/mobile latency RVA Javascript 2019 - @mdlavin
  • 4. Why GraphQL? On the client • Request just the data needed • Avoid multiple requests On the server • Compute and serialize only want the client requests Speed up development Reduce web/mobile latency RVA Javascript 2019 - @mdlavin
  • 5. Compared to REST REST • Many URLs • The URL that is requested designates the data to be returned • Fixed response attributes • The result is always the same for each type of URL* GraphQL • Single URL • The same URL is used for all request requests • Dynamic response attributes • The result includes only the data that is requested RVA Javascript 2019 - @mdlavin
  • 6. Queries • The client describes what it wants • Either a Query or a Mutation RVA Javascript 2019 - @mdlavin
  • 7. Sample Queries Request POST /graphql query GetBreweries { breweries { name } } Response { data: { breweries: [ { name: “The Answer” }, { name: “Triple Crossing” } ] } errors: [] } RVA Javascript 2019 - @mdlavin
  • 8. Schemas • The API contract between the client and server • Strictly typed • Facilitates great tools RVA Javascript 2019 - @mdlavin
  • 9. Sample Schema type Brewery { name: String! } type Query { breweries: [Brewery!]! breweryByName(name: String!): Brewery } RVA Javascript 2019 - @mdlavin
  • 10. Types • The building blocks of a Schema • Complex Types RVA Javascript 2019 - @mdlavin
  • 11. Samples Types type Brewery { name: String! taps: Int! beers(type Type): [Beer!]! } enum Type { IPA SOUR STOUT } type Beer { id: ID! name: String! ABV: Float! type: Type } RVA Javascript 2019 - @mdlavin
  • 12. Resolvers • Teach the server how to compute each value • Implementation detail • Structure allows optimal composition and computation 22 November 2019
  • 13. Sample Resolver { beers: async (parent: Brewery, args: Args, context: Context) => { const beers = await context.storage.lookupBeers(parent.id); const filteredBeers = beers.filter(beer => beer.type === args.type) return filteredBeers; } } RVA Javascript 2019 - @mdlavin
  • 14. Live Coding! React + Node built with Apollo RVA Javascript 2019 - @mdlavin
  • 15. Advanced features Queries Deferred results Partial results Types Interfaces Custom scalars Schemas Directives Stitching Codegen GraphQL + TypeScript RVA Javascript 2019 - @mdlavin
  • 16. Questions? .. or in person after …or on twitter @mdlavin RVA Javascript 2019 - @mdlavin

Editor's Notes

  1. I’m going to assume that you don’t GraphQL on a regular basis, or you would have picked a different talk