Movatterモバイル変換


[0]ホーム

URL:


SlideShare a Scribd company logo

GraphQL Introduction

Download as PPTX, PDF
4 likes3,542 views
Serge Huber
Serge Huber

This document introduces GraphQL, describing what it is and isn't. It explains that GraphQL is not a query language like SQL, but rather specifies fields that can be resolved through code. The document provides examples of GraphQL schemas, queries, and mutations. It also discusses GraphQL integration with various technologies like Relay and Java libraries. Finally, it demonstrates GraphQL tooling like GraphiQL and an example DX integration.

1 of 25
Downloaded 166 times
1
2
3
4
Most read
5
6
7
8
9
Most read
10
Most read
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
1GraphQL IntroductionSerge Huber, Jahia CTOshuber@jahia.com#graphqlMake some noise
WHAT IS GRAPHQL ?…and what it isn’t.
3WHAT IS GRAPHQL ?I like oppositesIt is not:• A query language like SQL, JCR-SQL, etc…• A URL specification• A finalized standard• A standard submitted to a standards body• A 100% JSON standard• A mature standard, changes are stillhappening
4WHAT IS GRAPHQL ?A (very) quick lookCourtesy of the GraphQL.org home page
5WHAT IS GRAPHQL ?Some usersCourtesy of the GraphQL.org home pageSee more on http://graphql.org/users
6WHAT IS GRAPHQL ?A quick demohttps://www.graphqlhub.com
7WHAT IS GRAPHQL ?Schemas• A schema that describes:• Objects• Object fields• Field arguments & directives• Interfaces• Unions
8WHAT IS GRAPHQL ?Fields, the key to understanding GraphQL !A field may be:• a static value• a value resolved through codeField may have:• Arguments that are likeparameters to a method call• Constraints to filter data• Directives that make the fieldconditional in the resultDon’t think of fields as variables,think of them as methods !
9WHAT IS GRAPHQL ?Queries• Queries• Specify what fields are part of theresult• Only fields specified in the schemaare acceptable• Field may be the result ofcomputations• Fields may specify arguments thatwill constrain the results (such asid:10)• Directives may also be used (such as@include)• Variables may be used• Fragments• Type casts !• Pagination (Relay schema)
10WHAT IS GRAPHQL ?Mutations• Mutations• Make it possible to write/modifydata• Very similar syntax to queries
11WHAT IS GRAPHQL ?Compared to REST APIsREST GraphQLSpecifies URL structure YES NOSpecifies request /response body structureNO YESValidation NO YESRequires a declaredschemaNO YESKey-Value friendly YES NOExtra (non CRUD) methodsstandardizedNO YES
GRAPHQL INTEGRATIONMapping to existing stuff
13GRAPHQL INTEGRATIONTypical architectureClientServerReact / React NativeRelayGraphQLData & Services
14GRAPHQL INTEGRATIONRelay
15GRAPHQL INTEGRATIONAngular 2 and Relayhttps://tech.small-improvements.com/2016/02/25/angular-2-and-relay/
16GRAPHQL INTEGRATIONJava Libraries• graphql-java : Java implementation of GraphQL• graphql-java-servlet : A relay-compatible OSGI Javaservlet• graphql-java-annotations : Can generate GraphQLschemas from Pojo annotations !
GRAPHQL TOOLINGWhat there’s tooling already ?
18GRAPHQL TOOLINGGraphiQL
19GRAPHQL TOOLINGGraphiQLFeatures• Auto-completion based on GraphQL schema• Execution of GraphQL queries and mutations• Input of variables• Result viewer• Built-in documentation browser
20GRAPHQL TOOLINGGraphQLHubA hub to test public GraphQLservices such as :• Hacker News• Reddit• GitHub• Twitter• Giphy• Relay-compatible Key-Value storeBut (strangely) not Facebook(probably because of APIkeys)
21GRAPHQL TOOLINGAwesome GraphQLBest list of tools & libraries at :https://github.com/chentsulin/awesome-graphqlSome cool examples:SQL Libraries• GraphpostgresQL - GraphQL for Postgres.• sql-to-graphql - Generate a GraphQL API based on your SQL databasestructure.• PostGraphQL - A GraphQL schema created by reflection over a PostgreSQLschema.
DX INTEGRATION DEMOYou’re not serious are you ?
23DX INTEGRATION DEMOThe sourceProject available here:http://www.github.com/Jahia/graphql-core-feature• Built as a Karaf features, requires DX 7.2 to run• Embeds GraphiQL as an administration UI !• Extensible through other modules, they simply provide query and mutationproviders !• Dynamic schema, re-generated every time a new mutation or query provider isregistered in the OSGi services registry• Based on the graphql-java-servlet project, available at:http://www.github.com/graphql/graphql-java-servlet• Still a lot to do, just beginning• Code is clearly a proof of concept prototype, lots of things will need cleaning upand refactoring• Mapping to JCR content still to be defined.
24QUESTIONS AND ANSWERSAsk away, don’t be shy
25shuber@jahia.comTHANK YOU FOR LISTENING
Ad

Recommended

PPTX
Introduction to GraphQL
Bhargav Anadkat
 
PPTX
Introduction to GraphQL
Rodrigo Prates
 
PDF
GraphQL: Enabling a new generation of API developer tools
Sashko Stubailo
 
PDF
Introduction to GraphQL
Sangeeta Ashrit
 
PPTX
An intro to GraphQL
valuebound
 
PDF
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
luisw19
 
PDF
REST vs GraphQL
Squareboat
 
PDF
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
Hafiz Ismail
 
PDF
Intro to GraphQL
Rakuten Group, Inc.
 
PDF
Better APIs with GraphQL
Josh Price
 
PDF
Graphql
Niv Ben David
 
PPTX
Introduction to graphQL
Muhilvarnan V
 
PPT
Graphql presentation
Vibhor Grover
 
PDF
React & GraphQL
Nikolas Burk
 
PDF
GraphQL
Joel Corrêa
 
PDF
How to GraphQL
Tomasz Bak
 
PDF
Spring GraphQL
VMware Tanzu
 
PDF
Introduction to GraphQL
Appier
 
PPTX
Introduction to GraphQL Presentation.pptx
Knoldus Inc.
 
PDF
The Apollo and GraphQL Stack
Sashko Stubailo
 
PDF
Swagger / Quick Start Guide
Andrii Gakhov
 
PDF
GraphQL
Cédric GILLET
 
PDF
GraphQL Fundamentals
Virbhadra Ankalkote
 
PDF
Getting Started with Spring for GraphQL
VMware Tanzu
 
PPTX
Document your rest api using swagger - Devoxx 2015
johannes_fiala
 
PPTX
GraphQL API Gateway and microservices
Mohammed Shaban
 
PPTX
GraphQL Introduction with Spring Boot
vipin kumar
 
PDF
Getting started with Apollo Client and GraphQL
Morgan Dedmon
 
PDF
Jahia DX 7.2 : Bye bye felix, hello karaf
Serge Huber
 
PDF
Introducing Apache Unomi - JavaOne 2015 Session
Serge Huber
 

More Related Content

What's hot(20)

PDF
Intro to GraphQL
Rakuten Group, Inc.
 
PDF
Better APIs with GraphQL
Josh Price
 
PDF
Graphql
Niv Ben David
 
PPTX
Introduction to graphQL
Muhilvarnan V
 
PPT
Graphql presentation
Vibhor Grover
 
PDF
React & GraphQL
Nikolas Burk
 
PDF
GraphQL
Joel Corrêa
 
PDF
How to GraphQL
Tomasz Bak
 
PDF
Spring GraphQL
VMware Tanzu
 
PDF
Introduction to GraphQL
Appier
 
PPTX
Introduction to GraphQL Presentation.pptx
Knoldus Inc.
 
PDF
The Apollo and GraphQL Stack
Sashko Stubailo
 
PDF
Swagger / Quick Start Guide
Andrii Gakhov
 
PDF
GraphQL
Cédric GILLET
 
PDF
GraphQL Fundamentals
Virbhadra Ankalkote
 
PDF
Getting Started with Spring for GraphQL
VMware Tanzu
 
PPTX
Document your rest api using swagger - Devoxx 2015
johannes_fiala
 
PPTX
GraphQL API Gateway and microservices
Mohammed Shaban
 
PPTX
GraphQL Introduction with Spring Boot
vipin kumar
 
PDF
Getting started with Apollo Client and GraphQL
Morgan Dedmon
 
Intro to GraphQL
Rakuten Group, Inc.
 
Better APIs with GraphQL
Josh Price
 
Graphql
Niv Ben David
 
Introduction to graphQL
Muhilvarnan V
 
Graphql presentation
Vibhor Grover
 
React & GraphQL
Nikolas Burk
 
GraphQL
Joel Corrêa
 
How to GraphQL
Tomasz Bak
 
Spring GraphQL
VMware Tanzu
 
Introduction to GraphQL
Appier
 
Introduction to GraphQL Presentation.pptx
Knoldus Inc.
 
The Apollo and GraphQL Stack
Sashko Stubailo
 
Swagger / Quick Start Guide
Andrii Gakhov
 
GraphQL Fundamentals
Virbhadra Ankalkote
 
Getting Started with Spring for GraphQL
VMware Tanzu
 
Document your rest api using swagger - Devoxx 2015
johannes_fiala
 
GraphQL API Gateway and microservices
Mohammed Shaban
 
GraphQL Introduction with Spring Boot
vipin kumar
 
Getting started with Apollo Client and GraphQL
Morgan Dedmon
 

Viewers also liked(9)

PDF
Jahia DX 7.2 : Bye bye felix, hello karaf
Serge Huber
 
PDF
Introducing Apache Unomi - JavaOne 2015 Session
Serge Huber
 
KEY
OSGi in 5 minutes
Serge Huber
 
PDF
Introducing the Jahia Log Analyzer
Serge Huber
 
PDF
Introduction to GraphQL
Brainhub
 
PDF
The Zero Bullshit Architecture
Lars Trieloff
 
PDF
GraphQL Story: Intro To GraphQL
Riza Fahmi
 
PDF
楽天のプライベートクラウドを支えるフラッシュストレージ
Rakuten Group, Inc.
 
PDF
Java modularity: life after Java 9
Sander Mak (@Sander_Mak)
 
Jahia DX 7.2 : Bye bye felix, hello karaf
Serge Huber
 
Introducing Apache Unomi - JavaOne 2015 Session
Serge Huber
 
OSGi in 5 minutes
Serge Huber
 
Introducing the Jahia Log Analyzer
Serge Huber
 
Introduction to GraphQL
Brainhub
 
The Zero Bullshit Architecture
Lars Trieloff
 
GraphQL Story: Intro To GraphQL
Riza Fahmi
 
楽天のプライベートクラウドを支えるフラッシュストレージ
Rakuten Group, Inc.
 
Java modularity: life after Java 9
Sander Mak (@Sander_Mak)
 
Ad

Similar to GraphQL Introduction(20)

PDF
GraphQL IndyJS April 2016
Brad Pillow
 
PDF
GraphQL
Deepak Shevani
 
PPTX
GraphQL - The new "Lingua Franca" for API-Development
jexp
 
PDF
GraphQL and Relay Modern
Carmel JavaScript Roundabout
 
PDF
GraphQL And Relay Modern
Brad Pillow
 
PDF
GraphQL And Relay Modern
Brad Pillow
 
PDF
A quick introduction to GraphQL
Ashokkumar T A
 
PPTX
GraphQL - Missing Link In REST
Anubolu Sreekanth
 
PDF
GraphQL for Native Apps
Emanuele Di Saverio
 
PDF
GraphQL ♥︎ GraphDB
GraphRM
 
PDF
Marco Liberati - Graph analytics
Codemotion
 
PDF
Let's start GraphQL: structure, behavior, and architecture
Andrii Gakhov
 
PPTX
GraphQL @ Manc.JS (March 2018)
Chris Grice
 
PDF
GraphQL + relay
Cédric GILLET
 
PDF
GraphQL - A love story
bwullems
 
PDF
Graphql usage
Valentin Buryakov
 
PPTX
GraphQL API Crafts presentation
Sudheer J
 
PDF
Modern APIs with GraphQL
Taikai
 
PDF
The GrapQL ecosystem
OlegsGabrusjonoks
 
PDF
Introduction to GraphQL
Knoldus Inc.
 
GraphQL IndyJS April 2016
Brad Pillow
 
GraphQL - The new "Lingua Franca" for API-Development
jexp
 
GraphQL and Relay Modern
Carmel JavaScript Roundabout
 
GraphQL And Relay Modern
Brad Pillow
 
GraphQL And Relay Modern
Brad Pillow
 
A quick introduction to GraphQL
Ashokkumar T A
 
GraphQL - Missing Link In REST
Anubolu Sreekanth
 
GraphQL for Native Apps
Emanuele Di Saverio
 
GraphQL ♥︎ GraphDB
GraphRM
 
Marco Liberati - Graph analytics
Codemotion
 
Let's start GraphQL: structure, behavior, and architecture
Andrii Gakhov
 
GraphQL @ Manc.JS (March 2018)
Chris Grice
 
GraphQL + relay
Cédric GILLET
 
GraphQL - A love story
bwullems
 
Graphql usage
Valentin Buryakov
 
GraphQL API Crafts presentation
Sudheer J
 
Modern APIs with GraphQL
Taikai
 
The GrapQL ecosystem
OlegsGabrusjonoks
 
Introduction to GraphQL
Knoldus Inc.
 
Ad

More from Serge Huber(8)

PPTX
ApacheCon NA 2019 : Adding AI to customer segmentation using Apache Unomi and...
Serge Huber
 
PPTX
ApacheCon NA 2019 : Customer segmentation and personalization using apache unomi
Serge Huber
 
PPTX
ApacheCon NA 2018 : Apache Unomi, an Open Source Customer Data Platformapache...
Serge Huber
 
PDF
DEVOXX FR 2016 We're Watching You (Apache Unomi)
Serge Huber
 
PDF
UXDev Summit Keynote : A real world story of Angular and Apache Unomi integra...
Serge Huber
 
PDF
Apache Unomi In Depth - ApacheCon EU 2015 Session
Serge Huber
 
PPT
Webinar Présentation jahia en collaboration avec Developpez.com
Serge Huber
 
PDF
Portets to composite applications
Serge Huber
 
ApacheCon NA 2019 : Adding AI to customer segmentation using Apache Unomi and...
Serge Huber
 
ApacheCon NA 2019 : Customer segmentation and personalization using apache unomi
Serge Huber
 
ApacheCon NA 2018 : Apache Unomi, an Open Source Customer Data Platformapache...
Serge Huber
 
DEVOXX FR 2016 We're Watching You (Apache Unomi)
Serge Huber
 
UXDev Summit Keynote : A real world story of Angular and Apache Unomi integra...
Serge Huber
 
Apache Unomi In Depth - ApacheCon EU 2015 Session
Serge Huber
 
Webinar Présentation jahia en collaboration avec Developpez.com
Serge Huber
 
Portets to composite applications
Serge Huber
 

Recently uploaded(20)

PDF
HydITEx corporation Booklet 2025 English
Георгий Феодориди
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PDF
2025-07-15 EMEA Volledig Inzicht Dutch Webinar
ThousandEyes
 
PPTX
Machine Learning Benefits Across Industries
SynapseIndia
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PPTX
Lifting and Rigging Safety AQG-2025-2.pptx
farrukhkhan658034
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PDF
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PDF
Arcee AI - building and working with small language models (06/25)
Julien SIMON
 
PDF
Productivity Management Software | Workstatus
Lovely Baghel
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
UiPath vs Other Automation Tools Meeting Presentation.pdf
Tracy Dixon
 
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
PDF
Upskill to Agentic Automation 2025 - Kickoff Meeting
DianaGray10
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PPTX
UI5Con 2025 - Get to Know Your UI5 Tooling
Wouter Lemaire
 
PDF
Sustainable and comertially viable mining process.pdf
Avijit Kumar Roy
 
PPTX
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
PPTX
UI5Con 2025 - Beyond UI5 Controls with the Rise of Web Components
Wouter Lemaire
 
HydITEx corporation Booklet 2025 English
Георгий Феодориди
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
2025-07-15 EMEA Volledig Inzicht Dutch Webinar
ThousandEyes
 
Machine Learning Benefits Across Industries
SynapseIndia
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
Lifting and Rigging Safety AQG-2025-2.pptx
farrukhkhan658034
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Arcee AI - building and working with small language models (06/25)
Julien SIMON
 
Productivity Management Software | Workstatus
Lovely Baghel
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
UiPath vs Other Automation Tools Meeting Presentation.pdf
Tracy Dixon
 
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
Upskill to Agentic Automation 2025 - Kickoff Meeting
DianaGray10
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
UI5Con 2025 - Get to Know Your UI5 Tooling
Wouter Lemaire
 
Sustainable and comertially viable mining process.pdf
Avijit Kumar Roy
 
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
UI5Con 2025 - Beyond UI5 Controls with the Rise of Web Components
Wouter Lemaire
 

GraphQL Introduction

  • 1.1GraphQL IntroductionSerge Huber, Jahia CTOshuber@jahia.com#graphqlMake some noise
  • 2.WHAT IS GRAPHQL ?…and what it isn’t.
  • 3.3WHAT IS GRAPHQL ?I like oppositesIt is not:• A query language like SQL, JCR-SQL, etc…• A URL specification• A finalized standard• A standard submitted to a standards body• A 100% JSON standard• A mature standard, changes are stillhappening
  • 4.4WHAT IS GRAPHQL ?A (very) quick lookCourtesy of the GraphQL.org home page
  • 5.5WHAT IS GRAPHQL ?Some usersCourtesy of the GraphQL.org home pageSee more on http://graphql.org/users
  • 6.6WHAT IS GRAPHQL ?A quick demohttps://www.graphqlhub.com
  • 7.7WHAT IS GRAPHQL ?Schemas• A schema that describes:• Objects• Object fields• Field arguments & directives• Interfaces• Unions
  • 8.8WHAT IS GRAPHQL ?Fields, the key to understanding GraphQL !A field may be:• a static value• a value resolved through codeField may have:• Arguments that are likeparameters to a method call• Constraints to filter data• Directives that make the fieldconditional in the resultDon’t think of fields as variables,think of them as methods !
  • 9.9WHAT IS GRAPHQL ?Queries• Queries• Specify what fields are part of theresult• Only fields specified in the schemaare acceptable• Field may be the result ofcomputations• Fields may specify arguments thatwill constrain the results (such asid:10)• Directives may also be used (such as@include)• Variables may be used• Fragments• Type casts !• Pagination (Relay schema)
  • 10.10WHAT IS GRAPHQL ?Mutations• Mutations• Make it possible to write/modifydata• Very similar syntax to queries
  • 11.11WHAT IS GRAPHQL ?Compared to REST APIsREST GraphQLSpecifies URL structure YES NOSpecifies request /response body structureNO YESValidation NO YESRequires a declaredschemaNO YESKey-Value friendly YES NOExtra (non CRUD) methodsstandardizedNO YES
  • 13.13GRAPHQL INTEGRATIONTypical architectureClientServerReact / React NativeRelayGraphQLData & Services
  • 15.15GRAPHQL INTEGRATIONAngular 2 and Relayhttps://tech.small-improvements.com/2016/02/25/angular-2-and-relay/
  • 16.16GRAPHQL INTEGRATIONJava Libraries• graphql-java : Java implementation of GraphQL• graphql-java-servlet : A relay-compatible OSGI Javaservlet• graphql-java-annotations : Can generate GraphQLschemas from Pojo annotations !
  • 17.GRAPHQL TOOLINGWhat there’s tooling already ?
  • 19.19GRAPHQL TOOLINGGraphiQLFeatures• Auto-completion based on GraphQL schema• Execution of GraphQL queries and mutations• Input of variables• Result viewer• Built-in documentation browser
  • 20.20GRAPHQL TOOLINGGraphQLHubA hub to test public GraphQLservices such as :• Hacker News• Reddit• GitHub• Twitter• Giphy• Relay-compatible Key-Value storeBut (strangely) not Facebook(probably because of APIkeys)
  • 21.21GRAPHQL TOOLINGAwesome GraphQLBest list of tools & libraries at :https://github.com/chentsulin/awesome-graphqlSome cool examples:SQL Libraries• GraphpostgresQL - GraphQL for Postgres.• sql-to-graphql - Generate a GraphQL API based on your SQL databasestructure.• PostGraphQL - A GraphQL schema created by reflection over a PostgreSQLschema.
  • 22.DX INTEGRATION DEMOYou’re not serious are you ?
  • 23.23DX INTEGRATION DEMOThe sourceProject available here:http://www.github.com/Jahia/graphql-core-feature• Built as a Karaf features, requires DX 7.2 to run• Embeds GraphiQL as an administration UI !• Extensible through other modules, they simply provide query and mutationproviders !• Dynamic schema, re-generated every time a new mutation or query provider isregistered in the OSGi services registry• Based on the graphql-java-servlet project, available at:http://www.github.com/graphql/graphql-java-servlet• Still a lot to do, just beginning• Code is clearly a proof of concept prototype, lots of things will need cleaning upand refactoring• Mapping to JCR content still to be defined.
  • 24.24QUESTIONS AND ANSWERSAsk away, don’t be shy

[8]ページ先頭

©2009-2025 Movatter.jp