SlideShare una empresa de Scribd logo
1 de 28
Descargar para leer sin conexión
GraphQL
The best thing to happen to the internet since cats.
About Me
About You
Let’s talk about RESTful APIs
Perfect endpoints
Everything is an entity
Routes are clear and defined
HTTP verbs and codes describe interaction
GET /products
POST /products
GET /products/4063745
PUT /products/4063745
Realistic endpoints
Entities are grow and change
Multiple requests for a single UI view
Routes get specialized and custom
Query parameters change responses
HTTP verbs and codes get creative
Actions start to get swept... somewhere
GET /products
GET /products?mobile=true
POST /products
POST /products?season=winter
GET /products/406
GET /products/406/images
PUT /products/406/upload-photo
POST /calc-ship?id=406&zip=33620
Real data happens
Perfect data sources
Everything lives in one database
Every table and entity match your app logic
Use a CDN to host large files and images
Integrate with great 3rd-party APIs like Stripe
Realistic data sources
Multiple, different databases
Databases that need love
First- and third-party APIs of varying quality
Legacy systems that haven’t been updated
JSON, Websockets, XML, CSVs
Real data sources happen
Coping with lots of data
Have massive, slow, and mostly unused responses
Create multiple versions of an endpoint for different scenarios
Use query parameter voodoo to save resources
Have a ton of conditional logic in the API to wrangle everything together
How about them docs tho?
Documentation is hard
Tools like Swagger and APIDoc are great but take effort to maintain
Framework goodies like Django Rest assume you don’t deviate
Custom docs site somewhere like Confluence is not fun to update
End result: Incomplete, out of date, or non-existent docs
Real business decisions happen
Versioning is hard
Maintaining backwards compatibility and support
Updating clients and tools ( unmaintained? )
Version the whole API or individual endpoints
Code and hardware can bloat quickly
Don’t forget the docs
How much insight is there?
Monitoring is hard ( and expensive )
Monitoring services like NewRelic
Lots of disparate and expensive data to connect
Lowest-level resolution is the request
Which parts of the response are most used or unused?
There is a better way
Data first, organization second
A single endpoint returns all data
A typed schema organizes all data into entities
Entities can span many data sources
The APIs job is to create a web of data
Data on demand
Request as much or as little data as needed
Multiple resources in a single request
No bloated responses
Format data on the server
No need to create custom endpoints
{
product {
id
name
images: {
url: ( size: "xs" )
altText
}
price: ( format: "usd" )
}
promotion {
id
name
}
}
Versions are dead, long live versioning
No need to version the whole API
Easily add new fields to entities
Ability to deprecate the old fields
@deprecated notifies requestors
Facebook famously still supports the 3GS
{
product {
id: ID
name: String
sizes: [ String ] @deprecated
availableSizes: [ ShirtSize ]
}
}
APIs that document themselves
A typed schema can generate good docs
Support for comments in the schema
GraphiQL lets you explore with your own data
GraphiQL has autocomplete and docs
3rd-party tools can create visuals and utilities
Monitor every detail
See how each field impacts performance
See which fields are used ( and how often )
and remove unused fields worry-free
Awesome resources
0-60 Full-stack tutorial
https://www.howtographql.com
Official docs and guides
http://graphql.org
Serverles GraphQL API as a service
https://www.graph.cool
The best full-stack tools and docs for GraphQL
http://dev.apollodata.com
¡ Gracias !
Charles V Burgess
Senior Developer @ Perch Security
GitHub: cvburgess
Web: cvburgess.com
Email: consulting@cvburgess.com
LinkedIn: cvburgess

Más contenido relacionado

La actualidad más candente

Azure data catalog your data your way eugene polonichko dataconf 21 04 18
Azure data catalog your data your way eugene polonichko dataconf 21 04 18Azure data catalog your data your way eugene polonichko dataconf 21 04 18
Azure data catalog your data your way eugene polonichko dataconf 21 04 18Olga Zinkevych
 
LogStash: Concept Run-Through
LogStash: Concept Run-ThroughLogStash: Concept Run-Through
LogStash: Concept Run-ThroughManuj Aggarwal
 
R2 microsoft ado.net data services datasheet
R2 microsoft ado.net data services   datasheetR2 microsoft ado.net data services   datasheet
R2 microsoft ado.net data services datasheetKlaudiia Jacome
 
Implementing BCS-Business Connectivity Services - Sharepoint 2013- Office 365
Implementing BCS-Business Connectivity Services - Sharepoint 2013- Office 365Implementing BCS-Business Connectivity Services - Sharepoint 2013- Office 365
Implementing BCS-Business Connectivity Services - Sharepoint 2013- Office 365Shahzad S
 
RDF Data Quality Assessment - connecting the pieces
RDF Data Quality Assessment - connecting the piecesRDF Data Quality Assessment - connecting the pieces
RDF Data Quality Assessment - connecting the piecesConnected Data World
 
Amundsen at Brex and Looker integration
Amundsen at Brex and Looker integrationAmundsen at Brex and Looker integration
Amundsen at Brex and Looker integrationmarkgrover
 
Encompassing Information Integration
Encompassing Information IntegrationEncompassing Information Integration
Encompassing Information Integrationnguyenfilip
 
No sql mongodb_publicsector2014_pp
No sql mongodb_publicsector2014_ppNo sql mongodb_publicsector2014_pp
No sql mongodb_publicsector2014_ppMongoDB
 
Overview Of ADO .NET from Wingslive.com
Overview Of ADO .NET from Wingslive.comOverview Of ADO .NET from Wingslive.com
Overview Of ADO .NET from Wingslive.comWings Interactive
 
It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...
It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...
It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...Shawn Jones
 
Getting your hands on graphs
Getting your hands on graphsGetting your hands on graphs
Getting your hands on graphsRed Pill Now
 
Transforming your application with Elasticsearch
Transforming your application with ElasticsearchTransforming your application with Elasticsearch
Transforming your application with ElasticsearchBrian Ritchie
 
Stephen Buxton | Data Integration - a Multi-Model Approach - Documents and Tr...
Stephen Buxton | Data Integration - a Multi-Model Approach - Documents and Tr...Stephen Buxton | Data Integration - a Multi-Model Approach - Documents and Tr...
Stephen Buxton | Data Integration - a Multi-Model Approach - Documents and Tr...semanticsconference
 
REA Group's journey with Data Cataloging and Amundsen
REA Group's journey with Data Cataloging and AmundsenREA Group's journey with Data Cataloging and Amundsen
REA Group's journey with Data Cataloging and Amundsenmarkgrover
 

La actualidad más candente (20)

Salesforce connect
Salesforce connectSalesforce connect
Salesforce connect
 
Azure data catalog your data your way eugene polonichko dataconf 21 04 18
Azure data catalog your data your way eugene polonichko dataconf 21 04 18Azure data catalog your data your way eugene polonichko dataconf 21 04 18
Azure data catalog your data your way eugene polonichko dataconf 21 04 18
 
LogStash: Concept Run-Through
LogStash: Concept Run-ThroughLogStash: Concept Run-Through
LogStash: Concept Run-Through
 
R2 microsoft ado.net data services datasheet
R2 microsoft ado.net data services   datasheetR2 microsoft ado.net data services   datasheet
R2 microsoft ado.net data services datasheet
 
Implementing BCS-Business Connectivity Services - Sharepoint 2013- Office 365
Implementing BCS-Business Connectivity Services - Sharepoint 2013- Office 365Implementing BCS-Business Connectivity Services - Sharepoint 2013- Office 365
Implementing BCS-Business Connectivity Services - Sharepoint 2013- Office 365
 
RDF Data Quality Assessment - connecting the pieces
RDF Data Quality Assessment - connecting the piecesRDF Data Quality Assessment - connecting the pieces
RDF Data Quality Assessment - connecting the pieces
 
Amundsen at Brex and Looker integration
Amundsen at Brex and Looker integrationAmundsen at Brex and Looker integration
Amundsen at Brex and Looker integration
 
Encompassing Information Integration
Encompassing Information IntegrationEncompassing Information Integration
Encompassing Information Integration
 
No sql mongodb_publicsector2014_pp
No sql mongodb_publicsector2014_ppNo sql mongodb_publicsector2014_pp
No sql mongodb_publicsector2014_pp
 
Overview Of ADO .NET from Wingslive.com
Overview Of ADO .NET from Wingslive.comOverview Of ADO .NET from Wingslive.com
Overview Of ADO .NET from Wingslive.com
 
It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...
It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...
It’s All About The Cards: Sharing on Social Media Encouraged HTML Metadata G...
 
Luz
LuzLuz
Luz
 
Getting your hands on graphs
Getting your hands on graphsGetting your hands on graphs
Getting your hands on graphs
 
Is BCS Dead?
Is BCS Dead?Is BCS Dead?
Is BCS Dead?
 
Transforming your application with Elasticsearch
Transforming your application with ElasticsearchTransforming your application with Elasticsearch
Transforming your application with Elasticsearch
 
Charles Ivie
Charles Ivie Charles Ivie
Charles Ivie
 
Ethical solutions services
Ethical solutions servicesEthical solutions services
Ethical solutions services
 
Stephen Buxton | Data Integration - a Multi-Model Approach - Documents and Tr...
Stephen Buxton | Data Integration - a Multi-Model Approach - Documents and Tr...Stephen Buxton | Data Integration - a Multi-Model Approach - Documents and Tr...
Stephen Buxton | Data Integration - a Multi-Model Approach - Documents and Tr...
 
Work flow
Work flowWork flow
Work flow
 
REA Group's journey with Data Cataloging and Amundsen
REA Group's journey with Data Cataloging and AmundsenREA Group's journey with Data Cataloging and Amundsen
REA Group's journey with Data Cataloging and Amundsen
 

Similar a Intro to GraphQL

Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web DevelopmentRobert J. Stein
 
Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)David McCarter
 
Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDBBrian Ritchie
 
Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)David McCarter
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Igor Moochnick
 
What is API - Understanding API Simplified
What is API - Understanding API SimplifiedWhat is API - Understanding API Simplified
What is API - Understanding API SimplifiedJubin Aghara
 
How to govern and secure a Data Mesh?
How to govern and secure a Data Mesh?How to govern and secure a Data Mesh?
How to govern and secure a Data Mesh?confluent
 
Why Data Virtualization? An Introduction by Denodo
Why Data Virtualization? An Introduction by DenodoWhy Data Virtualization? An Introduction by Denodo
Why Data Virtualization? An Introduction by DenodoJusto Hidalgo
 
Real World API Design Using The Entity Framework Services
Real World API Design Using The Entity Framework ServicesReal World API Design Using The Entity Framework Services
Real World API Design Using The Entity Framework ServicesDavid McCarter
 
Building RESTful Applications with OData
Building RESTful Applications with ODataBuilding RESTful Applications with OData
Building RESTful Applications with ODataTodd Anglin
 
CC Technology Summit 3 Update
CC Technology Summit 3 UpdateCC Technology Summit 3 Update
CC Technology Summit 3 UpdateNathan Yergler
 
Ipedo Company Overview
Ipedo Company OverviewIpedo Company Overview
Ipedo Company OverviewTim_Matthews
 
SQL Server 2008 Positioning
SQL Server 2008 PositioningSQL Server 2008 Positioning
SQL Server 2008 Positioningukdpe
 
ASP.NET 3.5 SP1
ASP.NET 3.5 SP1ASP.NET 3.5 SP1
ASP.NET 3.5 SP1Dave Allen
 
Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365Kashif Imran
 
Mobility & Data Strategies
Mobility & Data StrategiesMobility & Data Strategies
Mobility & Data StrategiesSam Basu
 
Lighthouse - an open-source library to build data lakes - Kris Peeters
Lighthouse - an open-source library to build data lakes - Kris PeetersLighthouse - an open-source library to build data lakes - Kris Peeters
Lighthouse - an open-source library to build data lakes - Kris PeetersData Science Leuven
 
A Look into the Apache OODT Ecosystem
A Look into the Apache OODT EcosystemA Look into the Apache OODT Ecosystem
A Look into the Apache OODT EcosystemChris Mattmann
 
Building social and RESTful frameworks
Building social and RESTful frameworksBuilding social and RESTful frameworks
Building social and RESTful frameworksbrendonschwartz
 

Similar a Intro to GraphQL (20)

Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
 
Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)
 
Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDB
 
Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
 
What is API - Understanding API Simplified
What is API - Understanding API SimplifiedWhat is API - Understanding API Simplified
What is API - Understanding API Simplified
 
How to govern and secure a Data Mesh?
How to govern and secure a Data Mesh?How to govern and secure a Data Mesh?
How to govern and secure a Data Mesh?
 
Why Data Virtualization? An Introduction by Denodo
Why Data Virtualization? An Introduction by DenodoWhy Data Virtualization? An Introduction by Denodo
Why Data Virtualization? An Introduction by Denodo
 
Real World API Design Using The Entity Framework Services
Real World API Design Using The Entity Framework ServicesReal World API Design Using The Entity Framework Services
Real World API Design Using The Entity Framework Services
 
Building RESTful Applications with OData
Building RESTful Applications with ODataBuilding RESTful Applications with OData
Building RESTful Applications with OData
 
CC Technology Summit 3 Update
CC Technology Summit 3 UpdateCC Technology Summit 3 Update
CC Technology Summit 3 Update
 
Ipedo Company Overview
Ipedo Company OverviewIpedo Company Overview
Ipedo Company Overview
 
SQL Server 2008 Positioning
SQL Server 2008 PositioningSQL Server 2008 Positioning
SQL Server 2008 Positioning
 
ASP.NET 3.5 SP1
ASP.NET 3.5 SP1ASP.NET 3.5 SP1
ASP.NET 3.5 SP1
 
Switch to Backend 2023
Switch to Backend 2023Switch to Backend 2023
Switch to Backend 2023
 
Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365
 
Mobility & Data Strategies
Mobility & Data StrategiesMobility & Data Strategies
Mobility & Data Strategies
 
Lighthouse - an open-source library to build data lakes - Kris Peeters
Lighthouse - an open-source library to build data lakes - Kris PeetersLighthouse - an open-source library to build data lakes - Kris Peeters
Lighthouse - an open-source library to build data lakes - Kris Peeters
 
A Look into the Apache OODT Ecosystem
A Look into the Apache OODT EcosystemA Look into the Apache OODT Ecosystem
A Look into the Apache OODT Ecosystem
 
Building social and RESTful frameworks
Building social and RESTful frameworksBuilding social and RESTful frameworks
Building social and RESTful frameworks
 

Último

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 

Último (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

Intro to GraphQL

  • 1. GraphQL The best thing to happen to the internet since cats.
  • 4. Let’s talk about RESTful APIs
  • 5.
  • 6. Perfect endpoints Everything is an entity Routes are clear and defined HTTP verbs and codes describe interaction GET /products POST /products GET /products/4063745 PUT /products/4063745
  • 7. Realistic endpoints Entities are grow and change Multiple requests for a single UI view Routes get specialized and custom Query parameters change responses HTTP verbs and codes get creative Actions start to get swept... somewhere GET /products GET /products?mobile=true POST /products POST /products?season=winter GET /products/406 GET /products/406/images PUT /products/406/upload-photo POST /calc-ship?id=406&zip=33620
  • 9. Perfect data sources Everything lives in one database Every table and entity match your app logic Use a CDN to host large files and images Integrate with great 3rd-party APIs like Stripe
  • 10. Realistic data sources Multiple, different databases Databases that need love First- and third-party APIs of varying quality Legacy systems that haven’t been updated JSON, Websockets, XML, CSVs
  • 12. Coping with lots of data Have massive, slow, and mostly unused responses Create multiple versions of an endpoint for different scenarios Use query parameter voodoo to save resources Have a ton of conditional logic in the API to wrangle everything together
  • 13. How about them docs tho?
  • 14. Documentation is hard Tools like Swagger and APIDoc are great but take effort to maintain Framework goodies like Django Rest assume you don’t deviate Custom docs site somewhere like Confluence is not fun to update End result: Incomplete, out of date, or non-existent docs
  • 15.
  • 17. Versioning is hard Maintaining backwards compatibility and support Updating clients and tools ( unmaintained? ) Version the whole API or individual endpoints Code and hardware can bloat quickly Don’t forget the docs
  • 18. How much insight is there?
  • 19. Monitoring is hard ( and expensive ) Monitoring services like NewRelic Lots of disparate and expensive data to connect Lowest-level resolution is the request Which parts of the response are most used or unused?
  • 20. There is a better way
  • 21.
  • 22. Data first, organization second A single endpoint returns all data A typed schema organizes all data into entities Entities can span many data sources The APIs job is to create a web of data
  • 23. Data on demand Request as much or as little data as needed Multiple resources in a single request No bloated responses Format data on the server No need to create custom endpoints { product { id name images: { url: ( size: "xs" ) altText } price: ( format: "usd" ) } promotion { id name } }
  • 24. Versions are dead, long live versioning No need to version the whole API Easily add new fields to entities Ability to deprecate the old fields @deprecated notifies requestors Facebook famously still supports the 3GS { product { id: ID name: String sizes: [ String ] @deprecated availableSizes: [ ShirtSize ] } }
  • 25. APIs that document themselves A typed schema can generate good docs Support for comments in the schema GraphiQL lets you explore with your own data GraphiQL has autocomplete and docs 3rd-party tools can create visuals and utilities
  • 26. Monitor every detail See how each field impacts performance See which fields are used ( and how often ) and remove unused fields worry-free
  • 27. Awesome resources 0-60 Full-stack tutorial https://www.howtographql.com Official docs and guides http://graphql.org Serverles GraphQL API as a service https://www.graph.cool The best full-stack tools and docs for GraphQL http://dev.apollodata.com
  • 28. ¡ Gracias ! Charles V Burgess Senior Developer @ Perch Security GitHub: cvburgess Web: cvburgess.com Email: consulting@cvburgess.com LinkedIn: cvburgess