SlideShare a Scribd company logo
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 1/37
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 2/37
Breaking REST Chains:
A Fastify & Mercurius Pathway to GraphQL Glory
Luca Del Puppo
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 3/37
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 4/37
Luca Del Puppo
Senior Software Developer
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 5/37
JavaScript enthusiast
TypeScript lover
“Youtuber”
“Writer”
Love sport: running,
hiking
Love animals
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 6/37
Why GraphQL?_
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 7/37
Rest API
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 8/37
Desktop
Browsers
Mobile
Browsers
Other
Browsers
TVs,
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 9/37
SmartWatch
s..
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 10/37
Bill is 22.
He is a Junior Backend
Developer who fights with the
Frontend and Mobile
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 11/37
developers to build a specific
endpoint for every single view,
with just some different fields
but the same logic
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 12/37
Desktop
Browsers
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 13/37
Mobile
Browsers
Other
Browsers
TVs,
SmartWatch
s..
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 14/37
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 15/37
Schema
Queries
Mutations
Subscriptions
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 16/37
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 17/37
You can scale your server "easily"_
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 18/37
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 19/37
But remember
every layer is a cost
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 20/37
Why Mercurius?_
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 21/37
is a high-performance GraphQL adapter for the web
framework
It has many core features and plugins for building world-class
production-ready applications
It supports advanced features out of the box, such as
and Subscriptions
It's entirely Open Source and made available under the MIT license
Fantastic community
Mercurius Fastify
Apollo
Federation specifications
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 22/37
Caching of query parsing and validation
Automatic loader integration to avoid the N+1 problem
Just-In-Time compiler via graphql-jit
Subscriptions
Federation support
Federated subscriptions support
Gateway implementation, including Subscriptions
Batched query support
Customizable persisted queries
Core features_
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 23/37
Today recipe_
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 24/37
. Build a GraphQL server with Mercurius Fastify and JavaScript
2. Convert it to TypeScript
3. Resolve 1+N problem
4. Add Custom Directives or Validations
5. Add Authentication
6. Working with Federation
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 25/37
Let's get our hands dirty_
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 26/37
Conclusion_
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 27/37
Don't hate REST API
Build one use from everyone
Build with Mercurius is a piece of cake
Don't forget, using Mercurius all the Fastify's benefits are there with
you
Be careful with the layers in your Applications
Give the right power to your Frontend Developers
Don't forget to monitor your server
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 28/37
About this presentations_
Slides
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 29/37
Code
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 30/37
Resources to read_
Fastify:
Mercurius:
Nearform Blog:
Backend Caffe:
https://fastify.dev/
https://mercurius.dev/
https://nearform.hashnode.dev/
https://backend.cafe/
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 31/37
Resources to watch_
Nearform:
Adventures in Nodeland:
https://www.youtube.com/@Nearform​
https://www.youtube.com/@adventuresinnodeland
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 32/37
Book_
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 33/37
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 34/37
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 35/37
Luca Del Puppo
@puppo92
Luca Del Puppo
Puppo_92
@puppo
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 36/37
We are hiring
23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory
https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 37/37
Thank you!_
Speaker notes

More Related Content

Similar to Breaking REST Chains_ A Fastify & Mercurius Pathway to GraphQL Glory.pdf (20)

PPTX
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
apidays
 
PPTX
GraphQL - Missing Link In REST
Anubolu Sreekanth
 
PPTX
Taking Control of your Data with GraphQL
Vinci Rufus
 
PDF
GraphQL - A love story
bwullems
 
PDF
codersera_com (1).pdf
ThomasWilfred1
 
PDF
GraphQL across the stack: How everything fits together
Sashko Stubailo
 
PDF
APIdays Paris 2019 - Public GraphQL APIs by Tobias Meixner, BRIKL BV
apidays
 
PDF
GraphQL
Cédric GILLET
 
PDF
From rest api to graph ql a 10 year journey
Arno Schulz
 
PDF
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...
Codemotion
 
PDF
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
Hafiz Ismail
 
PDF
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
luisw19
 
PDF
GraphQL and/or REST
Eugene Zharkov
 
PDF
GraphQL Server - Single point of opportunities
Tobias Meixner
 
PDF
GraphQL over REST at Reactathon 2018
Sashko Stubailo
 
PDF
DEVOXX UK 2018 - GraphQL as an alternative approach to REST
luisw19
 
PDF
All you need to know about GraphQL.pdf
YAN IT Solutions Pvt. Ltd
 
PDF
LeanIX GraphQL Lessons Learned - CodeTalks 2017
LeanIX GmbH
 
PDF
GraphQL for Native Apps
Emanuele Di Saverio
 
PDF
GraphQL in an Age of REST
Yos Riady
 
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
apidays
 
GraphQL - Missing Link In REST
Anubolu Sreekanth
 
Taking Control of your Data with GraphQL
Vinci Rufus
 
GraphQL - A love story
bwullems
 
codersera_com (1).pdf
ThomasWilfred1
 
GraphQL across the stack: How everything fits together
Sashko Stubailo
 
APIdays Paris 2019 - Public GraphQL APIs by Tobias Meixner, BRIKL BV
apidays
 
From rest api to graph ql a 10 year journey
Arno Schulz
 
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...
Codemotion
 
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
Hafiz Ismail
 
GraphQL as an alternative approach to REST (as presented at Java2Days/CodeMon...
luisw19
 
GraphQL and/or REST
Eugene Zharkov
 
GraphQL Server - Single point of opportunities
Tobias Meixner
 
GraphQL over REST at Reactathon 2018
Sashko Stubailo
 
DEVOXX UK 2018 - GraphQL as an alternative approach to REST
luisw19
 
All you need to know about GraphQL.pdf
YAN IT Solutions Pvt. Ltd
 
LeanIX GraphQL Lessons Learned - CodeTalks 2017
LeanIX GmbH
 
GraphQL for Native Apps
Emanuele Di Saverio
 
GraphQL in an Age of REST
Yos Riady
 

More from Commit University (20)

PDF
Accessibilità ed equità digitale: un impegno, non una scelta
Commit University
 
PDF
GitHub Copilot:vediamo chi comanda - Commit University.pdf
Commit University
 
PDF
Contract Driven Development - Branch 2024.pdf
Commit University
 
PPTX
Cybersecurity & AI: Illusioni e Speranze
Commit University
 
PDF
Migliorare la Developer Experience in un mondo Cloud Native
Commit University
 
PPTX
Scopri come sfruttare la potenza della Hybrid RAG
Commit University
 
PDF
Introduzione a AWS Forecast e SageMaker DeepAR: Prevedere la Domanda con il M...
Commit University
 
PDF
Oltre l'hype: vulnerabilità e limiti dell'intelligenza artificiale.pdf
Commit University
 
PPTX
Alla scoperta dei Vector Database e dei RAG
Commit University
 
PDF
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
 
PDF
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Commit University
 
PDF
Accelerating API Development: A Pit Stop with Gin-Gonic in Golang-Slide.pdf
Commit University
 
PDF
Slide-10years.pdf
Commit University
 
PDF
Collaborazione, Decisionalità e Gestione della Complessità nel Tempo: cosa ...
Commit University
 
PDF
Vue.js slots.pdf
Commit University
 
PPTX
Commit - Qwik il framework che ti stupirà.pptx
Commit University
 
PPTX
Sviluppare da zero una Angular Web App per la PA
Commit University
 
PDF
Backstage l'Internal Developer Portal Open Source per una migliore Developer ...
Commit University
 
PDF
Prisma the ORM that node was waiting for
Commit University
 
PDF
Decision-making for Software Development Teams - Commit University
Commit University
 
Accessibilità ed equità digitale: un impegno, non una scelta
Commit University
 
GitHub Copilot:vediamo chi comanda - Commit University.pdf
Commit University
 
Contract Driven Development - Branch 2024.pdf
Commit University
 
Cybersecurity & AI: Illusioni e Speranze
Commit University
 
Migliorare la Developer Experience in un mondo Cloud Native
Commit University
 
Scopri come sfruttare la potenza della Hybrid RAG
Commit University
 
Introduzione a AWS Forecast e SageMaker DeepAR: Prevedere la Domanda con il M...
Commit University
 
Oltre l'hype: vulnerabilità e limiti dell'intelligenza artificiale.pdf
Commit University
 
Alla scoperta dei Vector Database e dei RAG
Commit University
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Commit University
 
Accelerating API Development: A Pit Stop with Gin-Gonic in Golang-Slide.pdf
Commit University
 
Slide-10years.pdf
Commit University
 
Collaborazione, Decisionalità e Gestione della Complessità nel Tempo: cosa ...
Commit University
 
Vue.js slots.pdf
Commit University
 
Commit - Qwik il framework che ti stupirà.pptx
Commit University
 
Sviluppare da zero una Angular Web App per la PA
Commit University
 
Backstage l'Internal Developer Portal Open Source per una migliore Developer ...
Commit University
 
Prisma the ORM that node was waiting for
Commit University
 
Decision-making for Software Development Teams - Commit University
Commit University
 
Ad

Recently uploaded (20)

PDF
UiPath vs Other Automation Tools Meeting Presentation.pdf
Tracy Dixon
 
PDF
Arcee AI - building and working with small language models (06/25)
Julien SIMON
 
PPTX
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PPTX
Lecture 5 - Agentic AI and model context protocol.pptx
Dr. LAM Yat-fai (林日辉)
 
PDF
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
PDF
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
PDF
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
PDF
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
PDF
Rethinking Security Operations - Modern SOC.pdf
Haris Chughtai
 
PPTX
Simplifying End-to-End Apache CloudStack Deployment with a Web-Based Automati...
ShapeBlue
 
PDF
HR agent at Mediq: Lessons learned on Agent Builder & Maestro by Tacstone Tec...
UiPathCommunity
 
PPTX
Top Managed Service Providers in Los Angeles
Captain IT
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
CIFDAQ'S Token Spotlight for 16th July 2025 - ALGORAND
CIFDAQ
 
PDF
Upskill to Agentic Automation 2025 - Kickoff Meeting
DianaGray10
 
PDF
Market Wrap for 18th July 2025 by CIFDAQ
CIFDAQ
 
PDF
Integrating IIoT with SCADA in Oil & Gas A Technical Perspective.pdf
Rejig Digital
 
PPTX
python advanced data structure dictionary with examples python advanced data ...
sprasanna11
 
UiPath vs Other Automation Tools Meeting Presentation.pdf
Tracy Dixon
 
Arcee AI - building and working with small language models (06/25)
Julien SIMON
 
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
Lecture 5 - Agentic AI and model context protocol.pptx
Dr. LAM Yat-fai (林日辉)
 
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
Rethinking Security Operations - Modern SOC.pdf
Haris Chughtai
 
Simplifying End-to-End Apache CloudStack Deployment with a Web-Based Automati...
ShapeBlue
 
HR agent at Mediq: Lessons learned on Agent Builder & Maestro by Tacstone Tec...
UiPathCommunity
 
Top Managed Service Providers in Los Angeles
Captain IT
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
CIFDAQ'S Token Spotlight for 16th July 2025 - ALGORAND
CIFDAQ
 
Upskill to Agentic Automation 2025 - Kickoff Meeting
DianaGray10
 
Market Wrap for 18th July 2025 by CIFDAQ
CIFDAQ
 
Integrating IIoT with SCADA in Oil & Gas A Technical Perspective.pdf
Rejig Digital
 
python advanced data structure dictionary with examples python advanced data ...
sprasanna11
 
Ad

Breaking REST Chains_ A Fastify & Mercurius Pathway to GraphQL Glory.pdf

  • 1. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 1/37
  • 2. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 2/37 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory Luca Del Puppo
  • 3. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 3/37
  • 4. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 4/37 Luca Del Puppo Senior Software Developer
  • 5. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 5/37 JavaScript enthusiast TypeScript lover “Youtuber” “Writer” Love sport: running, hiking Love animals
  • 6. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 6/37 Why GraphQL?_
  • 7. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 7/37 Rest API
  • 8. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 8/37 Desktop Browsers Mobile Browsers Other Browsers TVs,
  • 9. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 9/37 SmartWatch s..
  • 10. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 10/37 Bill is 22. He is a Junior Backend Developer who fights with the Frontend and Mobile
  • 11. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 11/37 developers to build a specific endpoint for every single view, with just some different fields but the same logic
  • 12. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 12/37 Desktop Browsers
  • 13. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 13/37 Mobile Browsers Other Browsers TVs, SmartWatch s..
  • 14. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 14/37
  • 15. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 15/37 Schema Queries Mutations Subscriptions
  • 16. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 16/37
  • 17. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 17/37 You can scale your server "easily"_
  • 18. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 18/37
  • 19. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 19/37 But remember every layer is a cost
  • 20. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 20/37 Why Mercurius?_
  • 21. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 21/37 is a high-performance GraphQL adapter for the web framework It has many core features and plugins for building world-class production-ready applications It supports advanced features out of the box, such as and Subscriptions It's entirely Open Source and made available under the MIT license Fantastic community Mercurius Fastify Apollo Federation specifications
  • 22. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 22/37 Caching of query parsing and validation Automatic loader integration to avoid the N+1 problem Just-In-Time compiler via graphql-jit Subscriptions Federation support Federated subscriptions support Gateway implementation, including Subscriptions Batched query support Customizable persisted queries Core features_
  • 23. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 23/37 Today recipe_
  • 24. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 24/37 . Build a GraphQL server with Mercurius Fastify and JavaScript 2. Convert it to TypeScript 3. Resolve 1+N problem 4. Add Custom Directives or Validations 5. Add Authentication 6. Working with Federation
  • 25. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 25/37 Let's get our hands dirty_
  • 26. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 26/37 Conclusion_
  • 27. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 27/37 Don't hate REST API Build one use from everyone Build with Mercurius is a piece of cake Don't forget, using Mercurius all the Fastify's benefits are there with you Be careful with the layers in your Applications Give the right power to your Frontend Developers Don't forget to monitor your server
  • 28. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 28/37 About this presentations_ Slides
  • 29. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 29/37 Code
  • 30. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 30/37 Resources to read_ Fastify: Mercurius: Nearform Blog: Backend Caffe: https://fastify.dev/ https://mercurius.dev/ https://nearform.hashnode.dev/ https://backend.cafe/
  • 31. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 31/37 Resources to watch_ Nearform: Adventures in Nodeland: https://www.youtube.com/@Nearform​ https://www.youtube.com/@adventuresinnodeland
  • 32. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 32/37 Book_
  • 33. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 33/37
  • 34. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 34/37
  • 35. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 35/37 Luca Del Puppo @puppo92 Luca Del Puppo Puppo_92 @puppo
  • 36. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 36/37 We are hiring
  • 37. 23/02/24, 10:45 Breaking REST Chains: A Fastify & Mercurius Pathway to GraphQL Glory https://slides.com/puppo92/breaking-rest-chains-a-fastify-mercurius-pathway-to-graphql-glory/fullscreen 37/37 Thank you!_ Speaker notes