SlideShare a Scribd company logo
1
GraphQL Introduction
Serge Huber, Jahia CTO
shuber@jahia.com
#graphql
Make some noise
WHAT IS GRAPHQL ?
…and what it isn’t.
3
WHAT IS GRAPHQL ?
I like opposites
It 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 still
happening
4
WHAT IS GRAPHQL ?
A (very) quick look
Courtesy of the GraphQL.org home page
5
WHAT IS GRAPHQL ?
Some users
Courtesy of the GraphQL.org home page
See more on http://graphql.org/users
6
WHAT IS GRAPHQL ?
A quick demo
https://www.graphqlhub.com
7
WHAT IS GRAPHQL ?
Schemas
• A schema that describes:
• Objects
• Object fields
• Field arguments & directives
• Interfaces
• Unions
8
WHAT IS GRAPHQL ?
Fields, the key to understanding GraphQL !
A field may be:
• a static value
• a value resolved through code
Field may have:
• Arguments that are like
parameters to a method call
• Constraints to filter data
• Directives that make the field
conditional in the result
Don’t think of fields as variables,
think of them as methods !
9
WHAT IS GRAPHQL ?
Queries
• Queries
• Specify what fields are part of the
result
• Only fields specified in the schema
are acceptable
• Field may be the result of
computations
• Fields may specify arguments that
will constrain the results (such as
id:10)
• Directives may also be used (such as
@include)
• Variables may be used
• Fragments
• Type casts !
• Pagination (Relay schema)
10
WHAT IS GRAPHQL ?
Mutations
• Mutations
• Make it possible to write/modify
data
• Very similar syntax to queries
11
WHAT IS GRAPHQL ?
Compared to REST APIs
REST GraphQL
Specifies URL structure YES NO
Specifies request /
response body structure
NO YES
Validation NO YES
Requires a declared
schema
NO YES
Key-Value friendly YES NO
Extra (non CRUD) methods
standardized
NO YES
GRAPHQL INTEGRATION
Mapping to existing stuff
13
GRAPHQL INTEGRATION
Typical architecture
Client
Server
React / React Native
Relay
GraphQL
Data & Services
14
GRAPHQL INTEGRATION
Relay
15
GRAPHQL INTEGRATION
Angular 2 and Relay
https://tech.small-improvements.com/2016/02/25/angular-2-and-relay/
16
GRAPHQL INTEGRATION
Java Libraries
• graphql-java : Java implementation of GraphQL
• graphql-java-servlet : A relay-compatible OSGI Java
servlet
• graphql-java-annotations : Can generate GraphQL
schemas from Pojo annotations !
GRAPHQL TOOLING
What there’s tooling already ?
18
GRAPHQL TOOLING
GraphiQL
19
GRAPHQL TOOLING
GraphiQL
Features
• Auto-completion based on GraphQL schema
• Execution of GraphQL queries and mutations
• Input of variables
• Result viewer
• Built-in documentation browser
20
GRAPHQL TOOLING
GraphQLHub
A hub to test public GraphQL
services such as :
• Hacker News
• Reddit
• GitHub
• Twitter
• Giphy
• Relay-compatible Key-
Value store
But (strangely) not Facebook
(probably because of API
keys)
21
GRAPHQL TOOLING
Awesome GraphQL
Best list of tools & libraries at :
https://github.com/chentsulin/awesome-graphql
Some cool examples:
SQL Libraries
• GraphpostgresQL - GraphQL for Postgres.
• sql-to-graphql - Generate a GraphQL API based on your SQL database
structure.
• PostGraphQL - A GraphQL schema created by reflection over a PostgreSQL
schema.
DX INTEGRATION DEMO
You’re not serious are you ?
23
DX INTEGRATION DEMO
The source
Project 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 mutation
providers !
• Dynamic schema, re-generated every time a new mutation or query provider is
registered 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 up
and refactoring
• Mapping to JCR content still to be defined.
24
QUESTIONS AND ANSWERS
Ask away, don’t be shy
25
shuber@jahia.com
THANK YOU FOR LISTENING

More Related Content

What's hot

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
Sashko Stubailo
 
Building Modern APIs with GraphQL
Building Modern APIs with GraphQLBuilding Modern APIs with GraphQL
Building Modern APIs with GraphQL
Amazon Web Services
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
Bhargav Anadkat
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
Rodrigo Prates
 
Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)
Rafael Wilber Kerr
 
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...
luisw19
 
Better APIs with GraphQL
Better APIs with GraphQL Better APIs with GraphQL
Better APIs with GraphQL
Josh Price
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
Amazon Web Services
 
Graphql
GraphqlGraphql
Graphql
Niv Ben David
 
React & GraphQL
React & GraphQLReact & GraphQL
React & GraphQL
Nikolas Burk
 
GraphQL vs REST
GraphQL vs RESTGraphQL vs REST
GraphQL vs REST
GreeceJS
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
Appier
 
Spring GraphQL
Spring GraphQLSpring GraphQL
Spring GraphQL
VMware Tanzu
 
Introduction to GraphQL: Mobile Week SF
Introduction to GraphQL: Mobile Week SFIntroduction to GraphQL: Mobile Week SF
Introduction to GraphQL: Mobile Week SF
Amazon Web Services
 
How to GraphQL
How to GraphQLHow to GraphQL
How to GraphQL
Tomasz Bak
 
GraphQL
GraphQLGraphQL
GraphQL Fundamentals
GraphQL FundamentalsGraphQL Fundamentals
GraphQL Fundamentals
Virbhadra Ankalkote
 
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)
Hafiz Ismail
 
Intro GraphQL
Intro GraphQLIntro GraphQL
Intro GraphQL
Simona Cotin
 
Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI Spec
Adam Paxton
 

What's hot (20)

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
 
Building Modern APIs with GraphQL
Building Modern APIs with GraphQLBuilding Modern APIs with GraphQL
Building Modern APIs with GraphQL
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)
 
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...
 
Better APIs with GraphQL
Better APIs with GraphQL Better APIs with GraphQL
Better APIs with GraphQL
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Graphql
GraphqlGraphql
Graphql
 
React & GraphQL
React & GraphQLReact & GraphQL
React & GraphQL
 
GraphQL vs REST
GraphQL vs RESTGraphQL vs REST
GraphQL vs REST
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Spring GraphQL
Spring GraphQLSpring GraphQL
Spring GraphQL
 
Introduction to GraphQL: Mobile Week SF
Introduction to GraphQL: Mobile Week SFIntroduction to GraphQL: Mobile Week SF
Introduction to GraphQL: Mobile Week SF
 
How to GraphQL
How to GraphQLHow to GraphQL
How to GraphQL
 
GraphQL
GraphQLGraphQL
GraphQL
 
GraphQL Fundamentals
GraphQL FundamentalsGraphQL Fundamentals
GraphQL Fundamentals
 
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)
 
Intro GraphQL
Intro GraphQLIntro GraphQL
Intro GraphQL
 
Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI Spec
 

Viewers also liked

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

Viewers also liked (9)

Jahia DX 7.2 : Bye bye felix, hello karaf
Jahia DX 7.2 : Bye bye felix, hello karafJahia DX 7.2 : Bye bye felix, hello karaf
Jahia DX 7.2 : Bye bye felix, hello karaf
 
Introducing Apache Unomi - JavaOne 2015 Session
Introducing Apache Unomi - JavaOne 2015 SessionIntroducing Apache Unomi - JavaOne 2015 Session
Introducing Apache Unomi - JavaOne 2015 Session
 
OSGi in 5 minutes
OSGi in 5 minutesOSGi in 5 minutes
OSGi in 5 minutes
 
Introducing the Jahia Log Analyzer
Introducing the Jahia Log AnalyzerIntroducing the Jahia Log Analyzer
Introducing the Jahia Log Analyzer
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
The Zero Bullshit Architecture
The Zero Bullshit ArchitectureThe Zero Bullshit Architecture
The Zero Bullshit Architecture
 
GraphQL Story: Intro To GraphQL
GraphQL Story: Intro To GraphQLGraphQL Story: Intro To GraphQL
GraphQL Story: Intro To GraphQL
 
楽天のプライベートクラウドを支えるフラッシュストレージ
楽天のプライベートクラウドを支えるフラッシュストレージ楽天のプライベートクラウドを支えるフラッシュストレージ
楽天のプライベートクラウドを支えるフラッシュストレージ
 
Java modularity: life after Java 9
Java modularity: life after Java 9Java modularity: life after Java 9
Java modularity: life after Java 9
 

Similar to GraphQL Introduction

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
Matthew Groves
 
Building Fullstack Serverless GraphQL APIs In The Cloud
Building Fullstack Serverless GraphQL APIs In The CloudBuilding Fullstack Serverless GraphQL APIs In The Cloud
Building Fullstack Serverless GraphQL APIs In The Cloud
Nordic APIs
 
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...
apidays
 
Adding GraphQL to your existing architecture
Adding GraphQL to your existing architectureAdding GraphQL to your existing architecture
Adding GraphQL to your existing architecture
Sashko Stubailo
 
PHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLitePHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLite
JEAN-GUILLAUME DUJARDIN
 
The GraphQL Ecosystem in 2018
The GraphQL Ecosystem in 2018The GraphQL Ecosystem in 2018
The GraphQL Ecosystem in 2018
Nikolas Burk
 
Kotlin REST & GraphQL API
Kotlin REST & GraphQL APIKotlin REST & GraphQL API
Kotlin REST & GraphQL API
Sean O'Brien
 
Training Week: GraphQL 2022
Training Week: GraphQL 2022Training Week: GraphQL 2022
Training Week: GraphQL 2022
Neo4j
 
Getting Started with Spring for GraphQL
Getting Started with Spring for GraphQLGetting Started with Spring for GraphQL
Getting Started with Spring for GraphQL
VMware Tanzu
 
Training Series: Build APIs with Neo4j GraphQL Library
Training Series: Build APIs with Neo4j GraphQL LibraryTraining Series: Build APIs with Neo4j GraphQL Library
Training Series: Build APIs with Neo4j GraphQL Library
Neo4j
 
GraphQL-ify your APIs - Devoxx UK 2021
 GraphQL-ify your APIs - Devoxx UK 2021 GraphQL-ify your APIs - Devoxx UK 2021
GraphQL-ify your APIs - Devoxx UK 2021
Soham Dasgupta
 
Marco Liberati - Graph analytics
Marco Liberati - Graph analyticsMarco Liberati - Graph analytics
Marco Liberati - Graph analytics
Codemotion
 
GraphQL ♥︎ GraphDB
GraphQL ♥︎ GraphDBGraphQL ♥︎ GraphDB
GraphQL ♥︎ GraphDB
GraphRM
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
Knoldus Inc.
 
GraphQL + relay
GraphQL + relayGraphQL + relay
GraphQL + relay
Cédric GILLET
 
Create GraphQL server with apolloJS
Create GraphQL server with apolloJSCreate GraphQL server with apolloJS
Create GraphQL server with apolloJS
Jonathan Jalouzot
 
Graph ql and enterprise
Graph ql and enterpriseGraph ql and enterprise
Graph ql and enterprise
Alexander Tokarev
 
Modular GraphQL with Schema Stitching
Modular GraphQL with Schema StitchingModular GraphQL with Schema Stitching
Modular GraphQL with Schema Stitching
Sashko Stubailo
 
Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPC
Tim Burks
 
GraphQL-ify your APIs
GraphQL-ify your APIsGraphQL-ify your APIs
GraphQL-ify your APIs
Soham Dasgupta
 

Similar to GraphQL Introduction (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
 
Building Fullstack Serverless GraphQL APIs In The Cloud
Building Fullstack Serverless GraphQL APIs In The CloudBuilding Fullstack Serverless GraphQL APIs In The Cloud
Building Fullstack Serverless GraphQL APIs In The Cloud
 
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...
 
Adding GraphQL to your existing architecture
Adding GraphQL to your existing architectureAdding GraphQL to your existing architecture
Adding GraphQL to your existing architecture
 
PHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLitePHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLite
 
The GraphQL Ecosystem in 2018
The GraphQL Ecosystem in 2018The GraphQL Ecosystem in 2018
The GraphQL Ecosystem in 2018
 
Kotlin REST & GraphQL API
Kotlin REST & GraphQL APIKotlin REST & GraphQL API
Kotlin REST & GraphQL API
 
Training Week: GraphQL 2022
Training Week: GraphQL 2022Training Week: GraphQL 2022
Training Week: GraphQL 2022
 
Getting Started with Spring for GraphQL
Getting Started with Spring for GraphQLGetting Started with Spring for GraphQL
Getting Started with Spring for GraphQL
 
Training Series: Build APIs with Neo4j GraphQL Library
Training Series: Build APIs with Neo4j GraphQL LibraryTraining Series: Build APIs with Neo4j GraphQL Library
Training Series: Build APIs with Neo4j GraphQL Library
 
GraphQL-ify your APIs - Devoxx UK 2021
 GraphQL-ify your APIs - Devoxx UK 2021 GraphQL-ify your APIs - Devoxx UK 2021
GraphQL-ify your APIs - Devoxx UK 2021
 
Marco Liberati - Graph analytics
Marco Liberati - Graph analyticsMarco Liberati - Graph analytics
Marco Liberati - Graph analytics
 
GraphQL ♥︎ GraphDB
GraphQL ♥︎ GraphDBGraphQL ♥︎ GraphDB
GraphQL ♥︎ GraphDB
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
GraphQL + relay
GraphQL + relayGraphQL + relay
GraphQL + relay
 
Create GraphQL server with apolloJS
Create GraphQL server with apolloJSCreate GraphQL server with apolloJS
Create GraphQL server with apolloJS
 
Graph ql and enterprise
Graph ql and enterpriseGraph ql and enterprise
Graph ql and enterprise
 
Modular GraphQL with Schema Stitching
Modular GraphQL with Schema StitchingModular GraphQL with Schema Stitching
Modular GraphQL with Schema Stitching
 
Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPC
 
GraphQL-ify your APIs
GraphQL-ify your APIsGraphQL-ify your APIs
GraphQL-ify your APIs
 

More from Serge Huber

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

More from Serge Huber (8)

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

Recently uploaded

State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 

Recently uploaded (20)

State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 

GraphQL Introduction

  • 1. 1 GraphQL Introduction Serge Huber, Jahia CTO shuber@jahia.com #graphql Make some noise
  • 2. WHAT IS GRAPHQL ? …and what it isn’t.
  • 3. 3 WHAT IS GRAPHQL ? I like opposites It 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 still happening
  • 4. 4 WHAT IS GRAPHQL ? A (very) quick look Courtesy of the GraphQL.org home page
  • 5. 5 WHAT IS GRAPHQL ? Some users Courtesy of the GraphQL.org home page See more on http://graphql.org/users
  • 6. 6 WHAT IS GRAPHQL ? A quick demo https://www.graphqlhub.com
  • 7. 7 WHAT IS GRAPHQL ? Schemas • A schema that describes: • Objects • Object fields • Field arguments & directives • Interfaces • Unions
  • 8. 8 WHAT IS GRAPHQL ? Fields, the key to understanding GraphQL ! A field may be: • a static value • a value resolved through code Field may have: • Arguments that are like parameters to a method call • Constraints to filter data • Directives that make the field conditional in the result Don’t think of fields as variables, think of them as methods !
  • 9. 9 WHAT IS GRAPHQL ? Queries • Queries • Specify what fields are part of the result • Only fields specified in the schema are acceptable • Field may be the result of computations • Fields may specify arguments that will constrain the results (such as id:10) • Directives may also be used (such as @include) • Variables may be used • Fragments • Type casts ! • Pagination (Relay schema)
  • 10. 10 WHAT IS GRAPHQL ? Mutations • Mutations • Make it possible to write/modify data • Very similar syntax to queries
  • 11. 11 WHAT IS GRAPHQL ? Compared to REST APIs REST GraphQL Specifies URL structure YES NO Specifies request / response body structure NO YES Validation NO YES Requires a declared schema NO YES Key-Value friendly YES NO Extra (non CRUD) methods standardized NO YES
  • 13. 13 GRAPHQL INTEGRATION Typical architecture Client Server React / React Native Relay GraphQL Data & Services
  • 15. 15 GRAPHQL INTEGRATION Angular 2 and Relay https://tech.small-improvements.com/2016/02/25/angular-2-and-relay/
  • 16. 16 GRAPHQL INTEGRATION Java Libraries • graphql-java : Java implementation of GraphQL • graphql-java-servlet : A relay-compatible OSGI Java servlet • graphql-java-annotations : Can generate GraphQL schemas from Pojo annotations !
  • 17. GRAPHQL TOOLING What there’s tooling already ?
  • 19. 19 GRAPHQL TOOLING GraphiQL Features • Auto-completion based on GraphQL schema • Execution of GraphQL queries and mutations • Input of variables • Result viewer • Built-in documentation browser
  • 20. 20 GRAPHQL TOOLING GraphQLHub A hub to test public GraphQL services such as : • Hacker News • Reddit • GitHub • Twitter • Giphy • Relay-compatible Key- Value store But (strangely) not Facebook (probably because of API keys)
  • 21. 21 GRAPHQL TOOLING Awesome GraphQL Best list of tools & libraries at : https://github.com/chentsulin/awesome-graphql Some cool examples: SQL Libraries • GraphpostgresQL - GraphQL for Postgres. • sql-to-graphql - Generate a GraphQL API based on your SQL database structure. • PostGraphQL - A GraphQL schema created by reflection over a PostgreSQL schema.
  • 22. DX INTEGRATION DEMO You’re not serious are you ?
  • 23. 23 DX INTEGRATION DEMO The source Project 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 mutation providers ! • Dynamic schema, re-generated every time a new mutation or query provider is registered 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 up and refactoring • Mapping to JCR content still to be defined.
  • 24. 24 QUESTIONS AND ANSWERS Ask away, don’t be shy