SlideShare a Scribd company logo
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?

More Related Content

What's hot

How to GraphQL
How to GraphQLHow to GraphQL
How to GraphQL
Tomasz Bak
 
GraphQL Introduction
GraphQL IntroductionGraphQL Introduction
GraphQL Introduction
Serge Huber
 
GraphQL Introduction
GraphQL IntroductionGraphQL Introduction
GraphQL Introduction
bobo52310
 
Scala ♥ Graal by Flavio Brasil
Scala ♥ Graal by Flavio BrasilScala ♥ Graal by Flavio Brasil
Scala ♥ Graal by Flavio Brasil
scalaconfjp
 
GraphQL + relay
GraphQL + relayGraphQL + relay
GraphQL + relay
Cédric GILLET
 
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
 
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 GraphQL
Brainhub
 
Serverless GraphQL for Product Developers
Serverless GraphQL for Product DevelopersServerless GraphQL for Product Developers
Serverless GraphQL for Product Developers
Sashko Stubailo
 
GraphQL is new sexy
GraphQL is new sexyGraphQL is new sexy
GraphQL is new sexy
ITEM
 
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
Sashko Stubailo
 
Intro to GraphQL
 Intro to GraphQL Intro to GraphQL
Intro to GraphQL
Rakuten Group, Inc.
 
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
React 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
GraphQLGraphQL
GraphQL
Joel Corrêa
 
ODFKit
ODFKitODFKit
GraphQL Meetup Bangkok 3.0
GraphQL Meetup Bangkok 3.0GraphQL Meetup Bangkok 3.0
GraphQL Meetup Bangkok 3.0
Tobias 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 Neo4j
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
Bernd Alter
 
Graphql
GraphqlGraphql
Graphql
Niv Ben David
 

What's hot (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
 

Similar to 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 2022
Neo4j
 
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
Andrew 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 Library
Neo4j
 
Create GraphQL server with apolloJS
Create GraphQL server with apolloJSCreate GraphQL server with apolloJS
Create GraphQL server with apolloJS
Jonathan Jalouzot
 
Graphql usage
Graphql usageGraphql usage
Graphql usage
Valentin Buryakov
 
Full Stack Graph in the Cloud
Full Stack Graph in the CloudFull Stack Graph in the Cloud
Full Stack Graph in the Cloud
Neo4j
 
React, GraphQL и Relay - вполне себе нормальный компонентный подход (nodkz)
React, GraphQL и Relay - вполне себе нормальный компонентный подход (nodkz)React, GraphQL и Relay - вполне себе нормальный компонентный подход (nodkz)
React, GraphQL и Relay - вполне себе нормальный компонентный подход (nodkz)
Pavel Chertorogov
 
Graphql presentation
Graphql presentationGraphql presentation
Graphql presentation
Vibhor 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 together
React Conf Brasil
 
GraphQL- Presentation
GraphQL- PresentationGraphQL- Presentation
GraphQL- Presentation
Ridwan 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 gRPC
Tim 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 performance
Red Hat
 
Spring GraphQL
Spring GraphQLSpring GraphQL
Spring GraphQL
VMware Tanzu
 
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 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
Neo4j
 
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
 
GraphQL Summit 重點整理
GraphQL Summit 重點整理GraphQL Summit 重點整理
GraphQL Summit 重點整理
Chen-Tsu Lin
 
React js basics
React js basicsReact js basics
React js basics
Maulik Shah
 

Similar to 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
 

More from 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ójs
Jani 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 Customization
Jani 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.js
Jani 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 GraphQL
Jani 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 HHVM
Jani 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 2016
Jani Tarvainen
 
Isomorphic server side rendering with Twig
Isomorphic server side rendering with TwigIsomorphic server side rendering with Twig
Isomorphic server side rendering with Twig
Jani 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 Publish
Jani Tarvainen
 

More from 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
 

Recently uploaded

Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
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
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
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
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
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
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 

Recently uploaded (20)

Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
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
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
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...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
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
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 

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