SlideShare une entreprise Scribd logo
1  sur  12
Télécharger pour lire hors ligne
GraphQL
Unleash your backend
Summary
➔ Yet another f****** javascript framework ?
➔ Sounds great but REST already does it !
➔ Does it also cook ?
➔ Let’s cook !
➔ Questions ?
Yet another f*****g javascript framework ?
➔ NOT a framework, a Facebook SPECIFICATION !
➔ Define a query langage to query and fetch data from any backends in a declarative way
➔ At october 2015, still in draft...
➔ No roadmap known : it will be done when its done ! (Blizzard way)
WTF, is it just a rough draft ?
➔ Used in production by iOS and Android native Facebook apps since 2012
➔ Open sourced
➔ Redesigned to fit to a wide range of backends
➔ Reference implementation in JS : https://github.com/graphql/graphql-js
Give me the keys !
➔ Keys concepts of the GraphQL query language
◆ Hierarchical : a GraphQL query is a hierarchical set of fields
◆ Product-centric : the front drives the back ( finally !!! )
◆ Strong-typing : GraphQL queries are syntactically checked and provided data are type safe
◆ Client-specified queries : return exactly what the client is asking for, no more !
◆ Intropesctive : clients and tools can query the type system using the GraphQL syntax itself
◆ Application-layer Protocol : you can use FTP if you want
And if finally starting up ?
➔ Like JSON objects without properties
➔ Http the more common way to query (GET or POST)
➔ Not just read data, but create / update / delete via mutation
// a json object
{
"user": {
"name" : "myName"
}
}
// a graphql query
{
user {
name
}
}
// seems familiar ?
/graphql?query=query+getUser($id:ID){user(id:$id){name}}&variables={"id":"4"}
Sounds great but REST already does it !
➔ “Sure ! Ofcourse, we have a RESTful API”
“You mean ad hoc REST inspired endpoints”
“Absolutely, a REST adhoc ful endpoints architecture !”
“...”
➔ RESTful API is server centric : you deliver all kind of data no matter what the front realy
needs
➔ New needs often means new endpoints
Does it also cook ?
➔ NO !!!! it doesn’t cook for you
➔ Cache, cache everywhere !!!
◆ Proxy (HTTP GET/POST)
◆ Client
◆ Server (Node / Database)
➔ “You must unlearn what you have learned” Yoda
◆ Must work with front needs first
◆ Create custom data type
➔ Realized the GraphQL pattern is not trivial
Let’s cook !
https://ide.c9.io/telligcirdec/graphql
Scrambled eggs tasted good but nothing more ?
➔ We have just scratched the surface !
◆ mutation
◆ directive
◆ introspection
◆ validation
◆ operations
◆ etc...
Questions ?
?
Links
● https://github.com/facebook/graphql
● http://facebook.github.io/graphql
● https://github.com/graphql/graphql-js
● https://blog.risingstack.com/graphql-overview-getting-started-with-graphql-and-nodejs/
● https://facebook.github.io/react/blog/2015/05/01/graphql-introduction.html
● https://github.com/Netflix/falcor

Contenu connexe

Tendances

The Apollo and GraphQL Stack
The Apollo and GraphQL StackThe Apollo and GraphQL Stack
The Apollo and GraphQL Stack
Sashko Stubailo
 

Tendances (20)

Introduction to graphQL
Introduction to graphQLIntroduction to graphQL
Introduction to graphQL
 
Intro to GraphQL
 Intro to GraphQL Intro to GraphQL
Intro to GraphQL
 
Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
GraphQL Introduction
GraphQL IntroductionGraphQL Introduction
GraphQL Introduction
 
GraphQL Fundamentals
GraphQL FundamentalsGraphQL Fundamentals
GraphQL Fundamentals
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
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
 
REST vs GraphQL
REST vs GraphQLREST vs GraphQL
REST vs GraphQL
 
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
 
An intro to GraphQL
An intro to GraphQLAn intro to GraphQL
An intro to GraphQL
 
Better APIs with GraphQL
Better APIs with GraphQL Better APIs with GraphQL
Better APIs with GraphQL
 
The Apollo and GraphQL Stack
The Apollo and GraphQL StackThe Apollo and GraphQL Stack
The Apollo and GraphQL Stack
 
Spring GraphQL
Spring GraphQLSpring GraphQL
Spring GraphQL
 
Wroclaw GraphQL - GraphQL in Java
Wroclaw GraphQL - GraphQL in JavaWroclaw GraphQL - GraphQL in Java
Wroclaw GraphQL - GraphQL in Java
 
Introduction to GraphQL: Mobile Week SF
Introduction to GraphQL: Mobile Week SFIntroduction to GraphQL: Mobile Week SF
Introduction to GraphQL: Mobile Week SF
 
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
 
How to GraphQL: React Apollo
How to GraphQL: React ApolloHow to GraphQL: React Apollo
How to GraphQL: React Apollo
 
Introduction to Graph QL
Introduction to Graph QLIntroduction to Graph QL
Introduction to Graph QL
 

Similaire à GraphQL

Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code
維佋 唐
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
Ortus Solutions, Corp
 
Buildingwebapplicationswith.net
Buildingwebapplicationswith.netBuildingwebapplicationswith.net
Buildingwebapplicationswith.net
Kolagani Veera
 

Similaire à GraphQL (20)

JavaScript All The Things
JavaScript All The ThingsJavaScript All The Things
JavaScript All The Things
 
PHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLitePHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLite
 
Gary Fowler [InfluxData] | InfluxDB Scripting Languages | InfluxDays 2022
Gary Fowler [InfluxData] | InfluxDB Scripting Languages | InfluxDays 2022Gary Fowler [InfluxData] | InfluxDB Scripting Languages | InfluxDays 2022
Gary Fowler [InfluxData] | InfluxDB Scripting Languages | InfluxDays 2022
 
Graphql usage
Graphql usageGraphql usage
Graphql usage
 
GraphQL as a REST API alternative
GraphQL as a REST API alternativeGraphQL as a REST API alternative
GraphQL as a REST API alternative
 
Architecture | Busy Java Developers Guide to NoSQL | Ted Neward
Architecture | Busy Java Developers Guide to NoSQL | Ted NewardArchitecture | Busy Java Developers Guide to NoSQL | Ted Neward
Architecture | Busy Java Developers Guide to NoSQL | Ted Neward
 
Using the new WordPress REST API
Using the new WordPress REST APIUsing the new WordPress REST API
Using the new WordPress REST API
 
Voxxed Banff 2018 : Containers & Integration tests
Voxxed Banff 2018 : Containers & Integration testsVoxxed Banff 2018 : Containers & Integration tests
Voxxed Banff 2018 : Containers & Integration tests
 
ArangoDB
ArangoDBArangoDB
ArangoDB
 
Galaxy
GalaxyGalaxy
Galaxy
 
Tutorial: Building a GraphQL API in PHP
Tutorial: Building a GraphQL API in PHPTutorial: Building a GraphQL API in PHP
Tutorial: Building a GraphQL API in PHP
 
GraphQL in an Age of REST
GraphQL in an Age of RESTGraphQL in an Age of REST
GraphQL in an Age of REST
 
Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code
 
WordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo Meetup
WordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo MeetupWordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo Meetup
WordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo Meetup
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
 
Confoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to startConfoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to start
 
Buildingwebapplicationswith.net
Buildingwebapplicationswith.netBuildingwebapplicationswith.net
Buildingwebapplicationswith.net
 
How to build Sdk? Best practices
How to build Sdk? Best practicesHow to build Sdk? Best practices
How to build Sdk? Best practices
 
Doctrine ORM with eZ Platform REST API and GraphQL
Doctrine ORM with eZ Platform REST API and GraphQLDoctrine ORM with eZ Platform REST API and GraphQL
Doctrine ORM with eZ Platform REST API and GraphQL
 

Plus de Cédric GILLET (6)

Agile
AgileAgile
Agile
 
GraphQL + relay
GraphQL + relayGraphQL + relay
GraphQL + relay
 
Spring.io
Spring.ioSpring.io
Spring.io
 
Java 8
Java 8Java 8
Java 8
 
Le nouveau portail
Le nouveau portailLe nouveau portail
Le nouveau portail
 
Liquibase
LiquibaseLiquibase
Liquibase
 

Dernier

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Dernier (20)

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 

GraphQL

  • 2. Summary ➔ Yet another f****** javascript framework ? ➔ Sounds great but REST already does it ! ➔ Does it also cook ? ➔ Let’s cook ! ➔ Questions ?
  • 3. Yet another f*****g javascript framework ? ➔ NOT a framework, a Facebook SPECIFICATION ! ➔ Define a query langage to query and fetch data from any backends in a declarative way ➔ At october 2015, still in draft... ➔ No roadmap known : it will be done when its done ! (Blizzard way)
  • 4. WTF, is it just a rough draft ? ➔ Used in production by iOS and Android native Facebook apps since 2012 ➔ Open sourced ➔ Redesigned to fit to a wide range of backends ➔ Reference implementation in JS : https://github.com/graphql/graphql-js
  • 5. Give me the keys ! ➔ Keys concepts of the GraphQL query language ◆ Hierarchical : a GraphQL query is a hierarchical set of fields ◆ Product-centric : the front drives the back ( finally !!! ) ◆ Strong-typing : GraphQL queries are syntactically checked and provided data are type safe ◆ Client-specified queries : return exactly what the client is asking for, no more ! ◆ Intropesctive : clients and tools can query the type system using the GraphQL syntax itself ◆ Application-layer Protocol : you can use FTP if you want
  • 6. And if finally starting up ? ➔ Like JSON objects without properties ➔ Http the more common way to query (GET or POST) ➔ Not just read data, but create / update / delete via mutation // a json object { "user": { "name" : "myName" } } // a graphql query { user { name } } // seems familiar ? /graphql?query=query+getUser($id:ID){user(id:$id){name}}&variables={"id":"4"}
  • 7. Sounds great but REST already does it ! ➔ “Sure ! Ofcourse, we have a RESTful API” “You mean ad hoc REST inspired endpoints” “Absolutely, a REST adhoc ful endpoints architecture !” “...” ➔ RESTful API is server centric : you deliver all kind of data no matter what the front realy needs ➔ New needs often means new endpoints
  • 8. Does it also cook ? ➔ NO !!!! it doesn’t cook for you ➔ Cache, cache everywhere !!! ◆ Proxy (HTTP GET/POST) ◆ Client ◆ Server (Node / Database) ➔ “You must unlearn what you have learned” Yoda ◆ Must work with front needs first ◆ Create custom data type ➔ Realized the GraphQL pattern is not trivial
  • 10. Scrambled eggs tasted good but nothing more ? ➔ We have just scratched the surface ! ◆ mutation ◆ directive ◆ introspection ◆ validation ◆ operations ◆ etc...
  • 12. Links ● https://github.com/facebook/graphql ● http://facebook.github.io/graphql ● https://github.com/graphql/graphql-js ● https://blog.risingstack.com/graphql-overview-getting-started-with-graphql-and-nodejs/ ● https://facebook.github.io/react/blog/2015/05/01/graphql-introduction.html ● https://github.com/Netflix/falcor