SlideShare una empresa de Scribd logo
1 de 19
Descargar para leer sin conexión
GraphQL
Joel Corrêa
Software Engineer at @ilegra
@joelcorrea_
GraphQL is a query language created by Facebook in 2012 which
provides a common interface between the client and the server for
data fetching and manipulations
Design considerations
Hierarchical
- "We don't think of data in terms of resource URLs, secondary keys,
or join tables; we think about it in terms of a graph of objects and
the models we ultimately use in our apps like NSObjects or JSON."
- The query is shaped just like the data it returns
- Natural way for clients to describe data requirements
Product‐centric
- Driven by the requirements of views and the front‐end
engineers that write them
- GraphQL starts with their way of thinking the requirements and
build the language and runtime necessary to enable that
Strong‐typing
- Every GraphQL server defines an application‐specific type
system
- Given a query, tools can ensure that the query is both syntactically
correct and valid within the GraphQL type system before execution
- At the development time, and the server can make certain
guarantees about the shape and nature of the response.
Type system
Client‐specified queries
- It is the client that is responsible for specifying exactly how it will consume
those published capabilities.
- These queries are specified at field‐level granularity
- In the majority of client‐server applications written without GraphQL, the
server determines the data returned in its various scripted endpoints. A
GraphQL query, on the other hand, returns exactly what a client asks for
and no more.
Introspective
- A GraphQL server’s type system must be queryable by the GraphQL
language itself
Version free
- When you're adding new product features, additional fields can be added to the
server, leaving existing clients unaffected. When you're unsetting older features,
the corresponding server fields can be deprecated but continue to function.
- Gradual, backward-compatible process which removes the need for an
incrementing version number
- Facebook still support three years of released Facebook applications on the same
version of our GraphQL API
Transport independent
HTTP is just one option - GraphQL is transport independent, so you can
use it with websockets or even mqtt.
Goals
- A powerful and productive environment for building client
applications
- Product developers and designers building applications against
working GraphQL servers can quickly become productive without
reading extensive documentation and with little or no formal
training.
Query
References
- https://facebook.github.io/graphql/
- https://code.facebook.com/posts/1691455094417024/graphql-a-data-query-
language/
- https://www.youtube.com/watch?v=WQLzZf34FJ8
- JS Reference Server impl:
- https://github.com/graphql/graphql-js

Más contenido relacionado

La actualidad más candente

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

La actualidad más candente (20)

Intro to GraphQL
 Intro to GraphQL Intro to GraphQL
Intro to GraphQL
 
Graphql presentation
Graphql presentationGraphql presentation
Graphql presentation
 
Introduction to graphQL
Introduction to graphQLIntroduction to graphQL
Introduction to graphQL
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
How to GraphQL
How to GraphQLHow to GraphQL
How to GraphQL
 
Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)
 
React & GraphQL
React & GraphQLReact & GraphQL
React & GraphQL
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Building Modern APIs with GraphQL
Building Modern APIs with GraphQLBuilding Modern APIs with GraphQL
Building Modern APIs with GraphQL
 
GraphQL Introduction
GraphQL IntroductionGraphQL Introduction
GraphQL Introduction
 
GraphQL
GraphQLGraphQL
GraphQL
 
GraphQL Fundamentals
GraphQL FundamentalsGraphQL Fundamentals
GraphQL Fundamentals
 
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
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
The Apollo and GraphQL Stack
The Apollo and GraphQL StackThe Apollo and GraphQL Stack
The Apollo and GraphQL Stack
 
Introduction to GraphQL: Mobile Week SF
Introduction to GraphQL: Mobile Week SFIntroduction to GraphQL: Mobile Week SF
Introduction to GraphQL: Mobile Week SF
 
Intro GraphQL
Intro GraphQLIntro GraphQL
Intro GraphQL
 
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)
 
TypeScript and Angular workshop
TypeScript and Angular workshopTypeScript and Angular workshop
TypeScript and Angular workshop
 

Similar a GraphQL

Similar a GraphQL (20)

Graphql
GraphqlGraphql
Graphql
 
Graphql for Frontend Developers Simplifying Data Fetching.docx
Graphql for Frontend Developers Simplifying Data Fetching.docxGraphql for Frontend Developers Simplifying Data Fetching.docx
Graphql for Frontend Developers Simplifying Data Fetching.docx
 
GraphQL research summary
GraphQL research summaryGraphQL research summary
GraphQL research summary
 
How easy (or hard) it is to monitor your graph ql service performance
How easy (or hard) it is to monitor your graph ql service performanceHow easy (or hard) it is to monitor your graph ql service performance
How easy (or hard) it is to monitor your graph ql service performance
 
Rate Limiting GQLs Using Depth and Complexity Analysis
Rate Limiting GQLs Using Depth and Complexity AnalysisRate Limiting GQLs Using Depth and Complexity Analysis
Rate Limiting GQLs Using Depth and Complexity Analysis
 
codersera_com (1).pdf
codersera_com (1).pdfcodersera_com (1).pdf
codersera_com (1).pdf
 
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
 
GraphQL API Gateway and microservices
GraphQL API Gateway and microservicesGraphQL API Gateway and microservices
GraphQL API Gateway and microservices
 
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
 
apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...
apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...
apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...
 
Modern APIs with GraphQL
Modern APIs with GraphQLModern APIs with GraphQL
Modern APIs with GraphQL
 
How to Deploy a GraphQL API A Comprehensive Guide.docx
How to Deploy a GraphQL API A Comprehensive Guide.docxHow to Deploy a GraphQL API A Comprehensive Guide.docx
How to Deploy a GraphQL API A Comprehensive Guide.docx
 
Types of models
Types of modelsTypes of models
Types of models
 
apidays LIVE Paris - GraphQL meshes by Jens Neuse
apidays LIVE Paris - GraphQL meshes by Jens Neuseapidays LIVE Paris - GraphQL meshes by Jens Neuse
apidays LIVE Paris - GraphQL meshes by Jens Neuse
 
Building an Android app with GraphQL Unleashing the Power of Modern Mobile De...
Building an Android app with GraphQL Unleashing the Power of Modern Mobile De...Building an Android app with GraphQL Unleashing the Power of Modern Mobile De...
Building an Android app with GraphQL Unleashing the Power of Modern Mobile De...
 
GraphQL for Native Apps
GraphQL for Native AppsGraphQL for Native Apps
GraphQL for Native Apps
 
Harnessing the Power of GraphQL in WordPress
Harnessing the Power of GraphQL in WordPressHarnessing the Power of GraphQL in WordPress
Harnessing the Power of GraphQL in WordPress
 
GraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdfGraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdf
 
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...
 
ABHAY_SHUKLA
ABHAY_SHUKLAABHAY_SHUKLA
ABHAY_SHUKLA
 

Más de Joel Corrêa (8)

LXC outline
LXC outlineLXC outline
LXC outline
 
10 good reasons to invest your time in FP
10 good reasons to invest your time in FP10 good reasons to invest your time in FP
10 good reasons to invest your time in FP
 
Lift web framework
Lift web frameworkLift web framework
Lift web framework
 
Real world Python+django
Real world Python+djangoReal world Python+django
Real world Python+django
 
Zippers presentation
Zippers presentationZippers presentation
Zippers presentation
 
Concurrent paradigms - Paralelism approaches
Concurrent paradigms - Paralelism approachesConcurrent paradigms - Paralelism approaches
Concurrent paradigms - Paralelism approaches
 
The pragmatic programmer
The pragmatic programmerThe pragmatic programmer
The pragmatic programmer
 
Ooad presentation
Ooad presentationOoad presentation
Ooad presentation
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
"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 ...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
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...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
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
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

GraphQL

  • 1. GraphQL Joel Corrêa Software Engineer at @ilegra @joelcorrea_
  • 2. GraphQL is a query language created by Facebook in 2012 which provides a common interface between the client and the server for data fetching and manipulations
  • 4. Hierarchical - "We don't think of data in terms of resource URLs, secondary keys, or join tables; we think about it in terms of a graph of objects and the models we ultimately use in our apps like NSObjects or JSON." - The query is shaped just like the data it returns - Natural way for clients to describe data requirements
  • 5.
  • 6. Product‐centric - Driven by the requirements of views and the front‐end engineers that write them - GraphQL starts with their way of thinking the requirements and build the language and runtime necessary to enable that
  • 7. Strong‐typing - Every GraphQL server defines an application‐specific type system - Given a query, tools can ensure that the query is both syntactically correct and valid within the GraphQL type system before execution - At the development time, and the server can make certain guarantees about the shape and nature of the response.
  • 9. Client‐specified queries - It is the client that is responsible for specifying exactly how it will consume those published capabilities. - These queries are specified at field‐level granularity - In the majority of client‐server applications written without GraphQL, the server determines the data returned in its various scripted endpoints. A GraphQL query, on the other hand, returns exactly what a client asks for and no more.
  • 10. Introspective - A GraphQL server’s type system must be queryable by the GraphQL language itself
  • 11.
  • 12. Version free - When you're adding new product features, additional fields can be added to the server, leaving existing clients unaffected. When you're unsetting older features, the corresponding server fields can be deprecated but continue to function. - Gradual, backward-compatible process which removes the need for an incrementing version number - Facebook still support three years of released Facebook applications on the same version of our GraphQL API
  • 13.
  • 14. Transport independent HTTP is just one option - GraphQL is transport independent, so you can use it with websockets or even mqtt.
  • 15. Goals
  • 16. - A powerful and productive environment for building client applications - Product developers and designers building applications against working GraphQL servers can quickly become productive without reading extensive documentation and with little or no formal training.
  • 17. Query
  • 18.
  • 19. References - https://facebook.github.io/graphql/ - https://code.facebook.com/posts/1691455094417024/graphql-a-data-query- language/ - https://www.youtube.com/watch?v=WQLzZf34FJ8 - JS Reference Server impl: - https://github.com/graphql/graphql-js