SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
GRAPHQL APISGRAPHQL APIS
WITH EZ PLATFORMWITH EZ PLATFORM
SYMFONY CMSSYMFONY CMS
eZ Meetup Oslo
February 22nd 2018 - Jani Tarvainen
AgendaAgenda
GraphQL introduction
GraphQL with eZ Platform
GraphQL caveats
Headless site example using Next.js
GRAPHQLGRAPHQL
INTRODUCTIONINTRODUCTION
GraphQL introductionGraphQL introduction
Under the umbrella:
A communications protocol
A Query Language
Server implementations
Client implementations
Timeline:
Used at Facebook since 2012
Public release in 2015
Gaining momentum in 2017
Notable : GitHub, Pinterest, Neo4j,
Shopify, New York Times, Sky, Twitter, Yelp…
GraphQL
adopters
GraphQL introductionGraphQL introduction
An alternative to RESTful APIs
GraphQL independent of protocol,
Not using on HTTP verbs (POST, GET…)
REST is an architectural pattern
GraphQL is a specification
GraphQL APIs are strongly typed
Self-documenting
You WILL need to write descriptions ;)
GraphQL with PHP & SymfonyGraphQL with PHP & Symfony
Reference implementation in JavaScript
Two mature PHP implementations:
Both solid and feature complete
Symfony integrations:
More:
WebOnyx GraphQL library
Youshido GraphQL library
OverBlog GraphQL Bundle
Youshido GraphQL Bundle
GraphQL, PHP and Symfony
GraphQL client librariesGraphQL client libraries
You can use raw HTTP
Libs provide
Convenience
Client side caching
Security (Phear the dreaded GraphQL Injection)
Notable browser / Node.js libraries
Relay Modern
Apollo
Urql
GRAPHQL WITHGRAPHQL WITH
EZ PLATFORMEZ PLATFORM
GraphQL for CMSGraphQL for CMS
CMS has a lot of complexity (content types, permissions,
relations, content rendering…)
A generic protocol, not CMS specific
Queries are application specific
Developer friendly for queries (reads)
Colocation of queries and template
GraphQL and eZ PlatformGraphQL and eZ Platform
eZ Platform does not ship with GraphQL support
That won't stop you:
Use the eZ Platform GraphQL Bundle
Integrate using a Symfony GraphQL bundle
Roll your own GraphQL server (please don't!)
eZ Platform GraphQL BundleeZ Platform GraphQL Bundle
An experimental bundle from October 2016
Not maintained, but it's mostly glue code ¯(ツ)/¯
I to run with
Integrates the OverBlog GraphQL Bundle to repo
A decent feature list:
Query content, location and users
Search content, list location children…
forked it eZ Platform v2
GraphiQL shell
A simple example queryA simple example query
eZ Platform specific example
Gets location children's name property for location 2
{
locationChildren(id: 2) {
content {
name
}
}
}
Integrate usingIntegrate using
a Symfony GraphQL bundlea Symfony GraphQL bundle
Install a generic GraphQL Bundle
Both OverBlog and Youshido are solid
OverBlog focusing on Symfony 4 + Flex now
Similar functionality and lingo
You will need to:
Configure schema (with types)
Create resolver (to resolve queries from content repo)
Adding GraphQL API to your Symfony Flex app
My recommendationsMy recommendations
For tinkering:
Use the eZ Platform GraphQL Bundle
It works great, but there might be issues
You can
For production:
Create your own GraphQL Bundle integration
Exact control of what you expose
A generic framework to expose QueryTypes?
extend it with your queries
GraphQL CaveatsGraphQL Caveats
You're exposing an generic for users to query
Users may find things that they shouldn't
Users could cause load by
HTTP caching not trivial
Everything's a POST in most client libraries
Even GETs can be very different
Vulnerable to "GraphQL injections"
Client libraries sanitize input
It's just one tool - There's a time and place for it
complex or deep queries
HEADLESS SITEHEADLESS SITE
EXAMPLE USINGEXAMPLE USING
NEXT.JSNEXT.JS
A sample decoupled site built with the
universal JavaScript framework :Next.js
https://react.nu/
https://github.com/janit/decoupled-cms-nextjs-graphql
https://v1-11-hbgl5gq-oiiukjqgkij7e.eu.platform.sh/graphiql
https://janit.iki.fi/cms-graphql-nextjs/
https://www.youtube.com/watch?v=efoeIz9xTDs
THANK YOUTHANK YOU
Questions?

Contenu connexe

Tendances

How to GraphQL
How to GraphQLHow to GraphQL
How to GraphQLTomasz Bak
 
GraphQL Introduction
GraphQL IntroductionGraphQL Introduction
GraphQL IntroductionSerge Huber
 
GraphQL Introduction
GraphQL IntroductionGraphQL Introduction
GraphQL Introductionbobo52310
 
Scala ♥ Graal by Flavio Brasil
Scala ♥ Graal by Flavio BrasilScala ♥ Graal by Flavio Brasil
Scala ♥ Graal by Flavio Brasilscalaconfjp
 
Adding GraphQL to your existing architecture
Adding GraphQL to your existing architectureAdding GraphQL to your existing architecture
Adding GraphQL to your existing architectureSashko Stubailo
 
APIdays Paris 2019 - End-to-end Type-Safe GraphQL Apps by Carlos Rufo, GraphQ...
APIdays Paris 2019 - End-to-end Type-Safe GraphQL Apps by Carlos Rufo, GraphQ...APIdays Paris 2019 - End-to-end Type-Safe GraphQL Apps by Carlos Rufo, GraphQ...
APIdays Paris 2019 - End-to-end Type-Safe GraphQL Apps by Carlos Rufo, GraphQ...apidays
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQLBrainhub
 
Serverless GraphQL for Product Developers
Serverless GraphQL for Product DevelopersServerless GraphQL for Product Developers
Serverless GraphQL for Product DevelopersSashko Stubailo
 
GraphQL is new sexy
GraphQL is new sexyGraphQL is new sexy
GraphQL is new sexyITEM
 
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 togetherSashko Stubailo
 
James Baxley - Statically typing your GraphQL app
James Baxley - Statically typing your GraphQL appJames Baxley - Statically typing your GraphQL app
James Baxley - Statically typing your GraphQL appReact Conf Brasil
 
Build GraphQL APIs with Graphene (Big Mountain Data & Dev 2019)
Build GraphQL APIs with Graphene (Big Mountain Data & Dev 2019)Build GraphQL APIs with Graphene (Big Mountain Data & Dev 2019)
Build GraphQL APIs with Graphene (Big Mountain Data & Dev 2019)Ayla Khan
 
GraphQL Meetup Bangkok 3.0
GraphQL Meetup Bangkok 3.0GraphQL Meetup Bangkok 3.0
GraphQL Meetup Bangkok 3.0Tobias Meixner
 
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4j
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4jGraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4j
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4jNeo4j
 
Spryker meetup-distribute-your-spryker-deployment-with-docker-and-kubernetes
Spryker meetup-distribute-your-spryker-deployment-with-docker-and-kubernetesSpryker meetup-distribute-your-spryker-deployment-with-docker-and-kubernetes
Spryker meetup-distribute-your-spryker-deployment-with-docker-and-kubernetesBernd Alter
 

Tendances (20)

How to GraphQL
How to GraphQLHow to GraphQL
How to GraphQL
 
GraphQL Introduction
GraphQL IntroductionGraphQL Introduction
GraphQL Introduction
 
GraphQL Introduction
GraphQL IntroductionGraphQL Introduction
GraphQL Introduction
 
Scala ♥ Graal by Flavio Brasil
Scala ♥ Graal by Flavio BrasilScala ♥ Graal by Flavio Brasil
Scala ♥ Graal by Flavio Brasil
 
GraphQL + relay
GraphQL + relayGraphQL + relay
GraphQL + relay
 
Adding GraphQL to your existing architecture
Adding GraphQL to your existing architectureAdding GraphQL to your existing architecture
Adding GraphQL to your existing architecture
 
APIdays Paris 2019 - End-to-end Type-Safe GraphQL Apps by Carlos Rufo, GraphQ...
APIdays Paris 2019 - End-to-end Type-Safe GraphQL Apps by Carlos Rufo, GraphQ...APIdays Paris 2019 - End-to-end Type-Safe GraphQL Apps by Carlos Rufo, GraphQ...
APIdays Paris 2019 - End-to-end Type-Safe GraphQL Apps by Carlos Rufo, GraphQ...
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Serverless GraphQL for Product Developers
Serverless GraphQL for Product DevelopersServerless GraphQL for Product Developers
Serverless GraphQL for Product Developers
 
GraphQL is new sexy
GraphQL is new sexyGraphQL is new sexy
GraphQL is new sexy
 
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
 
Intro to GraphQL
 Intro to GraphQL Intro to GraphQL
Intro to GraphQL
 
James Baxley - Statically typing your GraphQL app
James Baxley - Statically typing your GraphQL appJames Baxley - Statically typing your GraphQL app
James Baxley - Statically typing your GraphQL app
 
Build GraphQL APIs with Graphene (Big Mountain Data & Dev 2019)
Build GraphQL APIs with Graphene (Big Mountain Data & Dev 2019)Build GraphQL APIs with Graphene (Big Mountain Data & Dev 2019)
Build GraphQL APIs with Graphene (Big Mountain Data & Dev 2019)
 
GraphQL
GraphQLGraphQL
GraphQL
 
ODFKit
ODFKitODFKit
ODFKit
 
GraphQL Meetup Bangkok 3.0
GraphQL Meetup Bangkok 3.0GraphQL Meetup Bangkok 3.0
GraphQL Meetup Bangkok 3.0
 
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4j
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4jGraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4j
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4j
 
Spryker meetup-distribute-your-spryker-deployment-with-docker-and-kubernetes
Spryker meetup-distribute-your-spryker-deployment-with-docker-and-kubernetesSpryker meetup-distribute-your-spryker-deployment-with-docker-and-kubernetes
Spryker meetup-distribute-your-spryker-deployment-with-docker-and-kubernetes
 
Graphql
GraphqlGraphql
Graphql
 

Similaire à GraphQL APIs is with eZ Platform, a Symfony CMS

Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)Rafael Wilber Kerr
 
Training Week: GraphQL 2022
Training Week: GraphQL 2022Training Week: GraphQL 2022
Training Week: GraphQL 2022Neo4j
 
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 PHPAndrew Rota
 
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...apidays
 
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 LibraryNeo4j
 
Create GraphQL server with apolloJS
Create GraphQL server with apolloJSCreate GraphQL server with apolloJS
Create GraphQL server with apolloJSJonathan Jalouzot
 
Full Stack Graph in the Cloud
Full Stack Graph in the CloudFull Stack Graph in the Cloud
Full Stack Graph in the CloudNeo4j
 
React, GraphQL и Relay - вполне себе нормальный компонентный подход (nodkz)
React, GraphQL и Relay - вполне себе нормальный компонентный подход (nodkz)React, GraphQL и Relay - вполне себе нормальный компонентный подход (nodkz)
React, GraphQL и Relay - вполне себе нормальный компонентный подход (nodkz)Pavel Chertorogov
 
Graphql presentation
Graphql presentationGraphql presentation
Graphql presentationVibhor Grover
 
Sashko Stubailo - The GraphQL and Apollo Stack: connecting everything together
Sashko Stubailo - The GraphQL and Apollo Stack: connecting everything togetherSashko Stubailo - The GraphQL and Apollo Stack: connecting everything together
Sashko Stubailo - The GraphQL and Apollo Stack: connecting everything togetherReact Conf Brasil
 
GraphQL- Presentation
GraphQL- PresentationGraphQL- Presentation
GraphQL- PresentationRidwan Fadjar
 
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 gRPCTim Burks
 
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 performanceLuca Mattia Ferrari
 
Getting Started with Spring for GraphQL
Getting Started with Spring for GraphQLGetting Started with Spring for GraphQL
Getting Started with Spring for GraphQLVMware Tanzu
 
Training Week: Build APIs with Neo4j GraphQL Library
Training Week: Build APIs with Neo4j GraphQL LibraryTraining Week: Build APIs with Neo4j GraphQL Library
Training Week: Build APIs with Neo4j GraphQL LibraryNeo4j
 
PHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLitePHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLiteJEAN-GUILLAUME DUJARDIN
 
GraphQL Summit 重點整理
GraphQL Summit 重點整理GraphQL Summit 重點整理
GraphQL Summit 重點整理Chen-Tsu Lin
 

Similaire à GraphQL APIs is with eZ Platform, a Symfony CMS (20)

Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)
 
Training Week: GraphQL 2022
Training Week: GraphQL 2022Training Week: GraphQL 2022
Training Week: GraphQL 2022
 
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
 
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
 
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
 
Create GraphQL server with apolloJS
Create GraphQL server with apolloJSCreate GraphQL server with apolloJS
Create GraphQL server with apolloJS
 
Graphql usage
Graphql usageGraphql usage
Graphql usage
 
Full Stack Graph in the Cloud
Full Stack Graph in the CloudFull Stack Graph in the Cloud
Full Stack Graph in the Cloud
 
React, GraphQL и Relay - вполне себе нормальный компонентный подход (nodkz)
React, GraphQL и Relay - вполне себе нормальный компонентный подход (nodkz)React, GraphQL и Relay - вполне себе нормальный компонентный подход (nodkz)
React, GraphQL и Relay - вполне себе нормальный компонентный подход (nodkz)
 
Graphql presentation
Graphql presentationGraphql presentation
Graphql presentation
 
Sashko Stubailo - The GraphQL and Apollo Stack: connecting everything together
Sashko Stubailo - The GraphQL and Apollo Stack: connecting everything togetherSashko Stubailo - The GraphQL and Apollo Stack: connecting everything together
Sashko Stubailo - The GraphQL and Apollo Stack: connecting everything together
 
GraphQL- Presentation
GraphQL- PresentationGraphQL- Presentation
GraphQL- Presentation
 
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
 
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
 
Spring GraphQL
Spring GraphQLSpring GraphQL
Spring GraphQL
 
Getting Started with Spring for GraphQL
Getting Started with Spring for GraphQLGetting Started with Spring for GraphQL
Getting Started with Spring for GraphQL
 
Training Week: Build APIs with Neo4j GraphQL Library
Training Week: Build APIs with Neo4j GraphQL LibraryTraining Week: Build APIs with Neo4j GraphQL Library
Training Week: Build APIs with Neo4j GraphQL Library
 
PHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLitePHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLite
 
GraphQL Summit 重點整理
GraphQL Summit 重點整理GraphQL Summit 重點整理
GraphQL Summit 重點整理
 
React js basics
React js basicsReact js basics
React js basics
 

Plus de Jani Tarvainen

Aggregation APi in Ibexa DXP by Adam Wójs
Aggregation APi in Ibexa DXP by Adam WójsAggregation APi in Ibexa DXP by Adam Wójs
Aggregation APi in Ibexa DXP by Adam WójsJani Tarvainen
 
Introduction to eZ Platform v2 UI Customization
Introduction to eZ Platform v2 UI CustomizationIntroduction to eZ Platform v2 UI Customization
Introduction to eZ Platform v2 UI CustomizationJani Tarvainen
 
Easy Decoupled Sitebuilding with GraphQL and Next.js
Easy Decoupled Sitebuilding with GraphQL and Next.jsEasy Decoupled Sitebuilding with GraphQL and Next.js
Easy Decoupled Sitebuilding with GraphQL and Next.jsJani Tarvainen
 
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 GraphQLJani Tarvainen
 
Using eZ Platform as a Headless CMS (with Vue.js)
Using eZ Platform as a Headless CMS (with Vue.js)Using eZ Platform as a Headless CMS (with Vue.js)
Using eZ Platform as a Headless CMS (with Vue.js)Jani Tarvainen
 
Performance Comparison of PHP 5.6 vs. 7.0 vs HHVM
Performance Comparison of PHP 5.6 vs. 7.0 vs HHVMPerformance Comparison of PHP 5.6 vs. 7.0 vs HHVM
Performance Comparison of PHP 5.6 vs. 7.0 vs HHVMJani Tarvainen
 
Exploring Content API Options - March 23rd 2016
Exploring Content API Options - March 23rd 2016Exploring Content API Options - March 23rd 2016
Exploring Content API Options - March 23rd 2016Jani Tarvainen
 
Isomorphic server side rendering with Twig
Isomorphic server side rendering with TwigIsomorphic server side rendering with Twig
Isomorphic server side rendering with TwigJani Tarvainen
 
Content Management Systems and Refactoring - Drupal, WordPress and eZ Publish
Content Management Systems and Refactoring - Drupal, WordPress and eZ PublishContent Management Systems and Refactoring - Drupal, WordPress and eZ Publish
Content Management Systems and Refactoring - Drupal, WordPress and eZ PublishJani Tarvainen
 

Plus de Jani Tarvainen (9)

Aggregation APi in Ibexa DXP by Adam Wójs
Aggregation APi in Ibexa DXP by Adam WójsAggregation APi in Ibexa DXP by Adam Wójs
Aggregation APi in Ibexa DXP by Adam Wójs
 
Introduction to eZ Platform v2 UI Customization
Introduction to eZ Platform v2 UI CustomizationIntroduction to eZ Platform v2 UI Customization
Introduction to eZ Platform v2 UI Customization
 
Easy Decoupled Sitebuilding with GraphQL and Next.js
Easy Decoupled Sitebuilding with GraphQL and Next.jsEasy Decoupled Sitebuilding with GraphQL and Next.js
Easy Decoupled Sitebuilding with GraphQL and Next.js
 
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
 
Using eZ Platform as a Headless CMS (with Vue.js)
Using eZ Platform as a Headless CMS (with Vue.js)Using eZ Platform as a Headless CMS (with Vue.js)
Using eZ Platform as a Headless CMS (with Vue.js)
 
Performance Comparison of PHP 5.6 vs. 7.0 vs HHVM
Performance Comparison of PHP 5.6 vs. 7.0 vs HHVMPerformance Comparison of PHP 5.6 vs. 7.0 vs HHVM
Performance Comparison of PHP 5.6 vs. 7.0 vs HHVM
 
Exploring Content API Options - March 23rd 2016
Exploring Content API Options - March 23rd 2016Exploring Content API Options - March 23rd 2016
Exploring Content API Options - March 23rd 2016
 
Isomorphic server side rendering with Twig
Isomorphic server side rendering with TwigIsomorphic server side rendering with Twig
Isomorphic server side rendering with Twig
 
Content Management Systems and Refactoring - Drupal, WordPress and eZ Publish
Content Management Systems and Refactoring - Drupal, WordPress and eZ PublishContent Management Systems and Refactoring - Drupal, WordPress and eZ Publish
Content Management Systems and Refactoring - Drupal, WordPress and eZ Publish
 

Dernier

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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...Martijn de Jong
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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 Scriptwesley chun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Dernier (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

GraphQL APIs is with eZ Platform, a Symfony CMS

  • 1. GRAPHQL APISGRAPHQL APIS WITH EZ PLATFORMWITH EZ PLATFORM SYMFONY CMSSYMFONY CMS eZ Meetup Oslo February 22nd 2018 - Jani Tarvainen
  • 2. AgendaAgenda GraphQL introduction GraphQL with eZ Platform GraphQL caveats Headless site example using Next.js
  • 4. GraphQL introductionGraphQL introduction Under the umbrella: A communications protocol A Query Language Server implementations Client implementations Timeline: Used at Facebook since 2012 Public release in 2015 Gaining momentum in 2017 Notable : GitHub, Pinterest, Neo4j, Shopify, New York Times, Sky, Twitter, Yelp… GraphQL adopters
  • 5. GraphQL introductionGraphQL introduction An alternative to RESTful APIs GraphQL independent of protocol, Not using on HTTP verbs (POST, GET…) REST is an architectural pattern GraphQL is a specification GraphQL APIs are strongly typed Self-documenting You WILL need to write descriptions ;)
  • 6. GraphQL with PHP & SymfonyGraphQL with PHP & Symfony Reference implementation in JavaScript Two mature PHP implementations: Both solid and feature complete Symfony integrations: More: WebOnyx GraphQL library Youshido GraphQL library OverBlog GraphQL Bundle Youshido GraphQL Bundle GraphQL, PHP and Symfony
  • 7. GraphQL client librariesGraphQL client libraries You can use raw HTTP Libs provide Convenience Client side caching Security (Phear the dreaded GraphQL Injection) Notable browser / Node.js libraries Relay Modern Apollo Urql
  • 8. GRAPHQL WITHGRAPHQL WITH EZ PLATFORMEZ PLATFORM
  • 9. GraphQL for CMSGraphQL for CMS CMS has a lot of complexity (content types, permissions, relations, content rendering…) A generic protocol, not CMS specific Queries are application specific Developer friendly for queries (reads) Colocation of queries and template
  • 10. GraphQL and eZ PlatformGraphQL and eZ Platform eZ Platform does not ship with GraphQL support That won't stop you: Use the eZ Platform GraphQL Bundle Integrate using a Symfony GraphQL bundle Roll your own GraphQL server (please don't!)
  • 11. eZ Platform GraphQL BundleeZ Platform GraphQL Bundle An experimental bundle from October 2016 Not maintained, but it's mostly glue code ¯(ツ)/¯ I to run with Integrates the OverBlog GraphQL Bundle to repo A decent feature list: Query content, location and users Search content, list location children… forked it eZ Platform v2 GraphiQL shell
  • 12. A simple example queryA simple example query eZ Platform specific example Gets location children's name property for location 2 { locationChildren(id: 2) { content { name } } }
  • 13. Integrate usingIntegrate using a Symfony GraphQL bundlea Symfony GraphQL bundle Install a generic GraphQL Bundle Both OverBlog and Youshido are solid OverBlog focusing on Symfony 4 + Flex now Similar functionality and lingo You will need to: Configure schema (with types) Create resolver (to resolve queries from content repo) Adding GraphQL API to your Symfony Flex app
  • 14. My recommendationsMy recommendations For tinkering: Use the eZ Platform GraphQL Bundle It works great, but there might be issues You can For production: Create your own GraphQL Bundle integration Exact control of what you expose A generic framework to expose QueryTypes? extend it with your queries
  • 15. GraphQL CaveatsGraphQL Caveats You're exposing an generic for users to query Users may find things that they shouldn't Users could cause load by HTTP caching not trivial Everything's a POST in most client libraries Even GETs can be very different Vulnerable to "GraphQL injections" Client libraries sanitize input It's just one tool - There's a time and place for it complex or deep queries
  • 16. HEADLESS SITEHEADLESS SITE EXAMPLE USINGEXAMPLE USING NEXT.JSNEXT.JS
  • 17. A sample decoupled site built with the universal JavaScript framework :Next.js https://react.nu/ https://github.com/janit/decoupled-cms-nextjs-graphql https://v1-11-hbgl5gq-oiiukjqgkij7e.eu.platform.sh/graphiql https://janit.iki.fi/cms-graphql-nextjs/ https://www.youtube.com/watch?v=efoeIz9xTDs