SlideShare a Scribd company logo
1 of 75
i’m roman
github: rastopyr
twitter: rastopyr_ua
software engineer
indiehacker
father
based on true story…
story 1
about product
redash.co
tracking ad perfomance
Marketing API
redash v1
support rest endpoints is hard
problem №1
/api/fb/campaings
/api/fb/campaings/:id/adsets
/api/fb/adsets
…
…
/api/fb/campaings/:id
support rest endpoints is hard
no REST - no pain
problem №2
SDK way
SDK
graphql is solution
🎉 redash v2 🎉
with graphql
🎉 redash v2 🎉
SDK
SDK in one place
SDK in one place
• validation
• aggregate requests
• pagination
• watch on limits
• …
facebook API endpoint
=
graphql resolver
facebook data type
=
graphql data type
no rest
relationships
in schema
graphql + TypeScript
code first way
SDL first way
and
code first way
1. define ts
define TS
code first way
1. define ts
2. implement resolver
implement resolver
3. define gql types
1. define ts
2. implement resolver
code first way
define gql type
naming convention
4. make schema
1. define ts
2. implement endpoint
code first way
3. define gql types
make schema
support static type checking
TS Definitions
Schema
API
type safe vertical
dev flow
direction
based on third party API
enough?
operations for computations
ROAS
Engagment Rate
operations for computations
update scheme on the fly
operations for computations
update scheme on the fly
cons
eat quota
•n + 1 ( cost analysis )
•big query ( queue in server )
•when service in scaling ( queue in infra )
save traffic
batch requests
pros
same patterns
type-safe
• TS interfaces for developers
• GraphQL API for clients
playground ❤️
story 2
about cloud
AWS have
~4000 methods
sdk
generated from scheme
service scheme
graphql scheme
generated from scheme
1. generated from scheme
graphql server for AWS
2. map resolvers to sdk
aws graphql demo
Rastopyr/zlit-graphql-demos
graphql-compose/graphql-
compose-aws
alternative implementation
pros
•auto-generated
•extended
•sync with schema
•versioning out of the box
cons
•no way to query custom fields from sdk
story 3
about hooks
webhooks
API’s want say
webhooks
Event
POST call
to your URL
handle
request
webhooks
webhook payload
github
dropbox
stripe
bitbucket
mailchimp
facebook
sendgrid
twitter
hubspot twillio
and more…
how to handle webhooks
1.convert to gql query
2. map to gql type
webhook types in schema
isolated webhook resolver
realtime with Subscriptions
webhook
graphql
server
clients
realtime with Subscriptions
webhook graphql demo
Rastopyr/zlit-graphql-demos
pros
•custom resolver for custom webhook
•no dependencies
•based on empty graphql server
cons
•stateful
thanks!
twitter: rastopyr_ua
Rastopyr/zlit-graphql-demos

More Related Content

Similar to GraphQL + Third Party API = | Роман Сенин | Zlit Tech

Similar to GraphQL + Third Party API = | Роман Сенин | Zlit Tech (20)

Euro python 2015 writing quality code
Euro python 2015   writing quality codeEuro python 2015   writing quality code
Euro python 2015 writing quality code
 
"Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
 
Android 101.pdf
Android 101.pdfAndroid 101.pdf
Android 101.pdf
 
GraphQL-ify your APIs
GraphQL-ify your APIsGraphQL-ify your APIs
GraphQL-ify your APIs
 
Introduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debuggerIntroduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debugger
 
Gradle by Example
Gradle by ExampleGradle by Example
Gradle by Example
 
Testing stage. being ahead business with cucumber
Testing stage. being ahead business with cucumberTesting stage. being ahead business with cucumber
Testing stage. being ahead business with cucumber
 
The 10 Commandments For The Eager Developer
The 10 Commandments For The Eager DeveloperThe 10 Commandments For The Eager Developer
The 10 Commandments For The Eager Developer
 
BDD with F# at DDDScot
BDD with F# at DDDScotBDD with F# at DDDScot
BDD with F# at DDDScot
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013
 
REST API vs gRPC, which one should you use in breaking a monolith [Dev conf 2...
REST API vs gRPC, which one should you use in breaking a monolith [Dev conf 2...REST API vs gRPC, which one should you use in breaking a monolith [Dev conf 2...
REST API vs gRPC, which one should you use in breaking a monolith [Dev conf 2...
 
GraphQL-ify your API - JFall 2022
GraphQL-ify your API - JFall 2022GraphQL-ify your API - JFall 2022
GraphQL-ify your API - JFall 2022
 
GraphQL_devoxx_2023.pptx
GraphQL_devoxx_2023.pptxGraphQL_devoxx_2023.pptx
GraphQL_devoxx_2023.pptx
 
Modern_cpp_auto.pdf
Modern_cpp_auto.pdfModern_cpp_auto.pdf
Modern_cpp_auto.pdf
 
R Markdown Tutorial For Beginners
R Markdown Tutorial For BeginnersR Markdown Tutorial For Beginners
R Markdown Tutorial For Beginners
 
What is flutter and why should i care?
What is flutter and why should i care?What is flutter and why should i care?
What is flutter and why should i care?
 
Don't let your tests slow you down
Don't let your tests slow you downDon't let your tests slow you down
Don't let your tests slow you down
 
Pwning mobile apps without root or jailbreak
Pwning mobile apps without root or jailbreakPwning mobile apps without root or jailbreak
Pwning mobile apps without root or jailbreak
 
Getting started with building your own standalone Gradle plugin
Getting started with building your own standalone Gradle pluginGetting started with building your own standalone Gradle plugin
Getting started with building your own standalone Gradle plugin
 
Xamarin + GraphQL
Xamarin + GraphQLXamarin + GraphQL
Xamarin + GraphQL
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

GraphQL + Third Party API = | Роман Сенин | Zlit Tech