SlideShare a Scribd company logo
1 of 30
Download to read offline
Using WordPress as a
Headless CMS with
WPGraphQL
Tampere WordPress Meetup, 14.11.2019
Ari-Pekka Koponen, Vincit, ari-pekka.koponen@vincit.fi
Who am I?
Ari-Pekka Koponen, by everybody calls me A-P.
The easiest way for me to get into flow is by coding. I’ve
worked 3½ years with WordPress full-time and a total of 7½
years as a full-stack developer.
I work as Tech Director at Vincit, where I help our customers
in selecting the best possible technologies for their business
needs and create wonderful digital services.
vincit.fi
2007Founded
450+Employees
43,5 M€
Turnover 2018
4,1 M€
EBIT 2018
Tampere – Helsinki – Turku – Oulu, FInland
Palo Alto – Orange County – Santa Monica, USA
Best place to work in Europe 2016
Best place to work in Finland 2014, 2015, 2016
(Great place to work)
Specialist of service and
business design,
software development
and continuous services
Award-winning
workplace
with 100% satisfaction guarantee.
Vincit in a Nutshell
If you love web-development and would like work interesting projects, please go to https://www.vincit.fi/en/careers/ and send an application. Do it now! 🔥
IKAALISTENMATKATOIMISTO.FI
300 000+
VISITORS PER MONTH
220%
INCREASE IN
CLUB LOYALTY
28%
INCREASE IN
AVERAGE PURCHASE
Designed and developed brand new web store
and customized ERP for Finnish travel agency
including dynamic pricing and integrated
marketing solutions.
Furthermore created and implemented concepts
for e.g. recommendation rewards and loyalty
program.
Customer story
ORAL.FI
Design and development of Oral
Hammaslääkärit website, OmaOral customer
service portal and web booking. In addition
development of internally used solutions for
better efficiency and customer service.
Customer story
Bullshit Bingo Time!
Bullshit Bingo Time!
1. Go to https://bit.ly/wp-bingo
2. Concoct a nickname and a team name for yourself
3. Use the Game name Bullshit-bingo
4. Click “Join!”
5. You now have your own, hand-made bullshit bingo card!
6. Listen to this talk and mark the bullshit words you hear.
7. When you get a bingo,
a. Stand up and
b. shout “THIS IS BULLSHIT!” and
c. you will receive a handsome 20€ (!!!) cash price!
Bullshit Bingo Time!
1. Go to https://bit.ly/wp-bingo
2. Concoct a nickname and a team name for yourself
3. Use the Game name Bullshit-bingo
4. Click “Join!”
5. You now have your own, hand-made bullshit bingo card!
6. Listen to this talk and mark the bullshit words you hear.
7. When you get a bingo,
a. Stand up and
b. shout “THIS IS BULLSHIT!” and
c. you will receive a handsome 20€ (!!!) cash price
40-50€ (!!!!!!) worth of movie tickets!
What is a Headless
CMS?
Traditional CMS architecture
The frontend and backend are
rendered on the server (in
WordPress).
The backend is coupled together
with the frontend.
WordPress
Frontend / UI Backend
Browser
Headless CMS architecture
The frontend and backend
separated with an API.
The frontend runs as a JavaScript
application on the user’s browser.
WordPress
JavaScript
App
Backend
HTTP
API
Mobile
Mobile App
Popular Headless CMS options
Popular options
- WordPress REST API (Open Source)
- Contentful (SaaS)
- Prismic (SaaS)
- Drupal? (Open Source)
Maybe soon popular
- WordPress WPGraphQL (Open Source)
What is GraphQL?
What is GraphQL?
GraphQL is a query language for your API.
It is not tied to any specific database or storage engine
and can be used with any programming language or
database.
GraphQL APIs have a strongly typed Schema. The
GraphQL Schema is composed of Types, and Types are
composed of Fields.
{
bingoGames(where: {title: "Fruitbingo"}) {
edges {
node {
id
title
words
players {
title
team {
title
}
}
}
}
}
}
This is what it looks like!
What is a Graph?
NodeNodeNode Node
Node Node
Node Node Node
Look, a third Edge here!An Edge A second Edge
OMG,
Edges everywhere!
What is a graph?
Graphs consist of nodes and edges.
A node is an individual resource. For example, a Post, Page, Bingo Game or User.
Edges are the connections between nodes.
A Bingo Graph
PlayerPlayerPlayer Player
Bingo Game Bingo Game
Team Team Team
Our Bingo Graph
MichaelPamAngela Dwight
Fruitbingo
Star Wars
bingo
Team Gosu Team 1337 Team OP
Why use GraphQL instead of REST?
A single endpoint for all queries.
A single way for documenting your API, that allows introspection. This allows tools like GraphiQL to
suggest you fields and relationships.
A standardized way for returning linked objects (relationships) in a single request.
The frontend developer can query just the fields they need. This makes payloads smaller and allows
the API developer to see what data is actually used.
Any questions?
How to use GraphQL
with WordPress?
How to use GraphQL with WordPress?
WPGraphQL (https://www.wpgraphql.com/) is a free plugin that exposes WordPress data through a
GraphQL API.
Built using the GraphQL-PHP library.
It provides an executable, extendable Schema and resolvers for a WordPress site.
DIY Bingo time!
Let’s Build a Bingo App using WPGraphQL
We’ll build a Bingo app using WordPress and React.
We could use any frontend framework, a static site generator like Gatsby or Nuxt, or even build a
mobile app).
I’ll use React today, because I’m familiar with it.
[DEMO]
Any questions?
Challenges in using
GraphQL with WordPress
Challenges in using GraphQL with WordPress
WPGraphQL is quite fresh (started in 2017) and has had a few very bad security issues. The newer
versions have addressed these issues and the codebase has been audited, but still a concern.
WordPress does not have a native and performant solution for post relationships, which makes
building performant Graph APIs hard.
Thank you!

More Related Content

What's hot

Transpilers Gone Wild: Introducing Hydra
Transpilers Gone Wild: Introducing HydraTranspilers Gone Wild: Introducing Hydra
Transpilers Gone Wild: Introducing HydraJoshua Shinavier
 
Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Robert Stern
 
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
 
REST vs GraphQL
REST vs GraphQLREST vs GraphQL
REST vs GraphQLSquareboat
 
Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)Rafael Wilber Kerr
 
How to GraphQL
How to GraphQLHow to GraphQL
How to GraphQLTomasz Bak
 
Speed-Up Kafka Delivery with AsyncAPI & Microcks | Hugo Guerrero, Red Hat
Speed-Up Kafka Delivery with AsyncAPI & Microcks | Hugo Guerrero, Red HatSpeed-Up Kafka Delivery with AsyncAPI & Microcks | Hugo Guerrero, Red Hat
Speed-Up Kafka Delivery with AsyncAPI & Microcks | Hugo Guerrero, Red HatHostedbyConfluent
 
Magento2.3 - GraphQL introduction
Magento2.3  - GraphQL introductionMagento2.3  - GraphQL introduction
Magento2.3 - GraphQL introductionVishakha Borkar
 
GraphQL API Gateway and microservices
GraphQL API Gateway and microservicesGraphQL API Gateway and microservices
GraphQL API Gateway and microservicesMohammed Shaban
 
Python Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkPython Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkAljoscha Krettek
 
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
 
Getting Started with Spring for GraphQL
Getting Started with Spring for GraphQLGetting Started with Spring for GraphQL
Getting Started with Spring for GraphQLVMware Tanzu
 
Introduction to Hibernate Framework
Introduction to Hibernate FrameworkIntroduction to Hibernate Framework
Introduction to Hibernate FrameworkMohit Kanwar
 
GraphQL IN Golang
GraphQL IN GolangGraphQL IN Golang
GraphQL IN GolangBo-Yi Wu
 

What's hot (20)

GraphQL
GraphQLGraphQL
GraphQL
 
Transpilers Gone Wild: Introducing Hydra
Transpilers Gone Wild: Introducing HydraTranspilers Gone Wild: Introducing Hydra
Transpilers Gone Wild: Introducing Hydra
 
Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1
 
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...
 
REST vs GraphQL
REST vs GraphQLREST vs GraphQL
REST vs GraphQL
 
Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
How to GraphQL
How to GraphQLHow to GraphQL
How to GraphQL
 
Speed-Up Kafka Delivery with AsyncAPI & Microcks | Hugo Guerrero, Red Hat
Speed-Up Kafka Delivery with AsyncAPI & Microcks | Hugo Guerrero, Red HatSpeed-Up Kafka Delivery with AsyncAPI & Microcks | Hugo Guerrero, Red Hat
Speed-Up Kafka Delivery with AsyncAPI & Microcks | Hugo Guerrero, Red Hat
 
Magento2.3 - GraphQL introduction
Magento2.3  - GraphQL introductionMagento2.3  - GraphQL introduction
Magento2.3 - GraphQL introduction
 
GraphQL API Gateway and microservices
GraphQL API Gateway and microservicesGraphQL API Gateway and microservices
GraphQL API Gateway and microservices
 
Graphql
GraphqlGraphql
Graphql
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Python Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkPython Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on Flink
 
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)
 
Getting Started with Spring for GraphQL
Getting Started with Spring for GraphQLGetting Started with Spring for GraphQL
Getting Started with Spring for GraphQL
 
Introduction to Hibernate Framework
Introduction to Hibernate FrameworkIntroduction to Hibernate Framework
Introduction to Hibernate Framework
 
GraphQL IN Golang
GraphQL IN GolangGraphQL IN Golang
GraphQL IN Golang
 

Similar to Using WordPress as a Headless CMS with WPGraphQL

Notes (2012-06-08)
Notes (2012-06-08)Notes (2012-06-08)
Notes (2012-06-08)Chris Pitt
 
Avato AI Review_ Human-Like Content & AI Graphics Easily - Google Docs.pdf
Avato AI Review_ Human-Like Content & AI Graphics Easily - Google Docs.pdfAvato AI Review_ Human-Like Content & AI Graphics Easily - Google Docs.pdf
Avato AI Review_ Human-Like Content & AI Graphics Easily - Google Docs.pdfFahimtajwar4
 
Raspberry pi user guide halfacree-gareth
Raspberry pi user guide halfacree-garethRaspberry pi user guide halfacree-gareth
Raspberry pi user guide halfacree-garethEram Stefano
 
Raspberry Pi ® User Guide
Raspberry Pi ® User GuideRaspberry Pi ® User Guide
Raspberry Pi ® User GuideImad Rhali
 
Guía de usuario de Raspberry Pi por Eben Upton
Guía de usuario de Raspberry Pi por Eben Upton Guía de usuario de Raspberry Pi por Eben Upton
Guía de usuario de Raspberry Pi por Eben Upton SANTIAGO PABLO ALBERTO
 
RPiUsersGuide.pdf
RPiUsersGuide.pdfRPiUsersGuide.pdf
RPiUsersGuide.pdfmohan s
 
So what can you do with the Raspberry Pi ? pi usersguide
So what can you do with the Raspberry Pi ?  pi usersguideSo what can you do with the Raspberry Pi ?  pi usersguide
So what can you do with the Raspberry Pi ? pi usersguideCMR WORLD TECH
 
Chico UI - Retreat 2011
Chico UI - Retreat 2011Chico UI - Retreat 2011
Chico UI - Retreat 2011Guillermo Paz
 
Why we are still writing?
Why we are still writing?Why we are still writing?
Why we are still writing?Alexander Osin
 
Securing The Studio: How Netflix Protects Productions From Pitch To Play
Securing The Studio: How Netflix Protects Productions From Pitch To PlaySecuring The Studio: How Netflix Protects Productions From Pitch To Play
Securing The Studio: How Netflix Protects Productions From Pitch To PlayPatrick Thomas
 
So you want to quit your day job and make a connected product
So you want to quit your day job and make a connected productSo you want to quit your day job and make a connected product
So you want to quit your day job and make a connected productAlexandra Deschamps-Sonsino
 
Alexandra Deschamps Sonsino - So you want to quit your dayjob to build a conn...
Alexandra Deschamps Sonsino - So you want to quit your dayjob to build a conn...Alexandra Deschamps Sonsino - So you want to quit your dayjob to build a conn...
Alexandra Deschamps Sonsino - So you want to quit your dayjob to build a conn...WithTheBest
 
Bradfield, Chris - Godot engine game development projects_ build five cross-p...
Bradfield, Chris - Godot engine game development projects_ build five cross-p...Bradfield, Chris - Godot engine game development projects_ build five cross-p...
Bradfield, Chris - Godot engine game development projects_ build five cross-p...Francisco S. Barralaga
 
iOS development made easy
iOS development made easyiOS development made easy
iOS development made easyAdrian Thompson
 
Kanoon Technology Web design - All designers
Kanoon Technology Web design - All designersKanoon Technology Web design - All designers
Kanoon Technology Web design - All designersSattra Rattanopas
 
Portland Splunk User Group May 2020
Portland Splunk User Group May 2020 Portland Splunk User Group May 2020
Portland Splunk User Group May 2020 Amanda Richardson
 
Build Own Website
Build Own WebsiteBuild Own Website
Build Own WebsiteIvy Rueb
 
Building Droids with JavaScript
Building Droids with JavaScriptBuilding Droids with JavaScript
Building Droids with JavaScriptAndrew Fisher
 

Similar to Using WordPress as a Headless CMS with WPGraphQL (20)

Notes (2012-06-08)
Notes (2012-06-08)Notes (2012-06-08)
Notes (2012-06-08)
 
Avato AI Review_ Human-Like Content & AI Graphics Easily - Google Docs.pdf
Avato AI Review_ Human-Like Content & AI Graphics Easily - Google Docs.pdfAvato AI Review_ Human-Like Content & AI Graphics Easily - Google Docs.pdf
Avato AI Review_ Human-Like Content & AI Graphics Easily - Google Docs.pdf
 
Raspberry pi user guide halfacree-gareth
Raspberry pi user guide halfacree-garethRaspberry pi user guide halfacree-gareth
Raspberry pi user guide halfacree-gareth
 
Guia de usuario Raspberry PI - version en ingles
Guia de usuario Raspberry PI - version en inglesGuia de usuario Raspberry PI - version en ingles
Guia de usuario Raspberry PI - version en ingles
 
Raspberry Pi ® User Guide
Raspberry Pi ® User GuideRaspberry Pi ® User Guide
Raspberry Pi ® User Guide
 
Guía de usuario de Raspberry Pi por Eben Upton
Guía de usuario de Raspberry Pi por Eben Upton Guía de usuario de Raspberry Pi por Eben Upton
Guía de usuario de Raspberry Pi por Eben Upton
 
RPiUsersGuide.pdf
RPiUsersGuide.pdfRPiUsersGuide.pdf
RPiUsersGuide.pdf
 
So what can you do with the Raspberry Pi ? pi usersguide
So what can you do with the Raspberry Pi ?  pi usersguideSo what can you do with the Raspberry Pi ?  pi usersguide
So what can you do with the Raspberry Pi ? pi usersguide
 
Chico UI - Retreat 2011
Chico UI - Retreat 2011Chico UI - Retreat 2011
Chico UI - Retreat 2011
 
Why we are still writing?
Why we are still writing?Why we are still writing?
Why we are still writing?
 
Securing The Studio: How Netflix Protects Productions From Pitch To Play
Securing The Studio: How Netflix Protects Productions From Pitch To PlaySecuring The Studio: How Netflix Protects Productions From Pitch To Play
Securing The Studio: How Netflix Protects Productions From Pitch To Play
 
So you want to quit your day job and make a connected product
So you want to quit your day job and make a connected productSo you want to quit your day job and make a connected product
So you want to quit your day job and make a connected product
 
Alexandra Deschamps Sonsino - So you want to quit your dayjob to build a conn...
Alexandra Deschamps Sonsino - So you want to quit your dayjob to build a conn...Alexandra Deschamps Sonsino - So you want to quit your dayjob to build a conn...
Alexandra Deschamps Sonsino - So you want to quit your dayjob to build a conn...
 
Ink AI Review.pdf
Ink AI Review.pdfInk AI Review.pdf
Ink AI Review.pdf
 
Bradfield, Chris - Godot engine game development projects_ build five cross-p...
Bradfield, Chris - Godot engine game development projects_ build five cross-p...Bradfield, Chris - Godot engine game development projects_ build five cross-p...
Bradfield, Chris - Godot engine game development projects_ build five cross-p...
 
iOS development made easy
iOS development made easyiOS development made easy
iOS development made easy
 
Kanoon Technology Web design - All designers
Kanoon Technology Web design - All designersKanoon Technology Web design - All designers
Kanoon Technology Web design - All designers
 
Portland Splunk User Group May 2020
Portland Splunk User Group May 2020 Portland Splunk User Group May 2020
Portland Splunk User Group May 2020
 
Build Own Website
Build Own WebsiteBuild Own Website
Build Own Website
 
Building Droids with JavaScript
Building Droids with JavaScriptBuilding Droids with JavaScript
Building Droids with JavaScript
 

Recently uploaded

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Recently uploaded (20)

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

Using WordPress as a Headless CMS with WPGraphQL

  • 1. Using WordPress as a Headless CMS with WPGraphQL Tampere WordPress Meetup, 14.11.2019 Ari-Pekka Koponen, Vincit, ari-pekka.koponen@vincit.fi
  • 2. Who am I? Ari-Pekka Koponen, by everybody calls me A-P. The easiest way for me to get into flow is by coding. I’ve worked 3½ years with WordPress full-time and a total of 7½ years as a full-stack developer. I work as Tech Director at Vincit, where I help our customers in selecting the best possible technologies for their business needs and create wonderful digital services.
  • 4. 2007Founded 450+Employees 43,5 M€ Turnover 2018 4,1 M€ EBIT 2018 Tampere – Helsinki – Turku – Oulu, FInland Palo Alto – Orange County – Santa Monica, USA Best place to work in Europe 2016 Best place to work in Finland 2014, 2015, 2016 (Great place to work) Specialist of service and business design, software development and continuous services Award-winning workplace with 100% satisfaction guarantee. Vincit in a Nutshell If you love web-development and would like work interesting projects, please go to https://www.vincit.fi/en/careers/ and send an application. Do it now! 🔥
  • 5. IKAALISTENMATKATOIMISTO.FI 300 000+ VISITORS PER MONTH 220% INCREASE IN CLUB LOYALTY 28% INCREASE IN AVERAGE PURCHASE Designed and developed brand new web store and customized ERP for Finnish travel agency including dynamic pricing and integrated marketing solutions. Furthermore created and implemented concepts for e.g. recommendation rewards and loyalty program. Customer story
  • 6. ORAL.FI Design and development of Oral Hammaslääkärit website, OmaOral customer service portal and web booking. In addition development of internally used solutions for better efficiency and customer service. Customer story
  • 8. Bullshit Bingo Time! 1. Go to https://bit.ly/wp-bingo 2. Concoct a nickname and a team name for yourself 3. Use the Game name Bullshit-bingo 4. Click “Join!” 5. You now have your own, hand-made bullshit bingo card! 6. Listen to this talk and mark the bullshit words you hear. 7. When you get a bingo, a. Stand up and b. shout “THIS IS BULLSHIT!” and c. you will receive a handsome 20€ (!!!) cash price!
  • 9. Bullshit Bingo Time! 1. Go to https://bit.ly/wp-bingo 2. Concoct a nickname and a team name for yourself 3. Use the Game name Bullshit-bingo 4. Click “Join!” 5. You now have your own, hand-made bullshit bingo card! 6. Listen to this talk and mark the bullshit words you hear. 7. When you get a bingo, a. Stand up and b. shout “THIS IS BULLSHIT!” and c. you will receive a handsome 20€ (!!!) cash price 40-50€ (!!!!!!) worth of movie tickets!
  • 10. What is a Headless CMS?
  • 11. Traditional CMS architecture The frontend and backend are rendered on the server (in WordPress). The backend is coupled together with the frontend. WordPress Frontend / UI Backend
  • 12. Browser Headless CMS architecture The frontend and backend separated with an API. The frontend runs as a JavaScript application on the user’s browser. WordPress JavaScript App Backend HTTP API Mobile Mobile App
  • 13. Popular Headless CMS options Popular options - WordPress REST API (Open Source) - Contentful (SaaS) - Prismic (SaaS) - Drupal? (Open Source) Maybe soon popular - WordPress WPGraphQL (Open Source)
  • 15. What is GraphQL? GraphQL is a query language for your API. It is not tied to any specific database or storage engine and can be used with any programming language or database. GraphQL APIs have a strongly typed Schema. The GraphQL Schema is composed of Types, and Types are composed of Fields. { bingoGames(where: {title: "Fruitbingo"}) { edges { node { id title words players { title team { title } } } } } } This is what it looks like!
  • 16. What is a Graph? NodeNodeNode Node Node Node Node Node Node Look, a third Edge here!An Edge A second Edge OMG, Edges everywhere!
  • 17. What is a graph? Graphs consist of nodes and edges. A node is an individual resource. For example, a Post, Page, Bingo Game or User. Edges are the connections between nodes.
  • 18. A Bingo Graph PlayerPlayerPlayer Player Bingo Game Bingo Game Team Team Team
  • 19. Our Bingo Graph MichaelPamAngela Dwight Fruitbingo Star Wars bingo Team Gosu Team 1337 Team OP
  • 20. Why use GraphQL instead of REST? A single endpoint for all queries. A single way for documenting your API, that allows introspection. This allows tools like GraphiQL to suggest you fields and relationships. A standardized way for returning linked objects (relationships) in a single request. The frontend developer can query just the fields they need. This makes payloads smaller and allows the API developer to see what data is actually used.
  • 22. How to use GraphQL with WordPress?
  • 23. How to use GraphQL with WordPress? WPGraphQL (https://www.wpgraphql.com/) is a free plugin that exposes WordPress data through a GraphQL API. Built using the GraphQL-PHP library. It provides an executable, extendable Schema and resolvers for a WordPress site.
  • 25. Let’s Build a Bingo App using WPGraphQL We’ll build a Bingo app using WordPress and React. We could use any frontend framework, a static site generator like Gatsby or Nuxt, or even build a mobile app). I’ll use React today, because I’m familiar with it.
  • 28. Challenges in using GraphQL with WordPress
  • 29. Challenges in using GraphQL with WordPress WPGraphQL is quite fresh (started in 2017) and has had a few very bad security issues. The newer versions have addressed these issues and the codebase has been audited, but still a concern. WordPress does not have a native and performant solution for post relationships, which makes building performant Graph APIs hard.