SlideShare a Scribd company logo
Real-time GraphQL
In Angular app
Mikhail Asavkin
@limenutt
Real-time GraphQL in Angular app
3
Skychute
PropTech
Development
Breaking new ground using
software in the property industry.
4
Skychute
PropTech
Development
Breaking new ground using
software in the property industry.
● 5 B2B Products transforming
business of the biggest Property
Developers and Agencies in Australia
5
Skychute
PropTech
Development
Breaking new ground using
software in the property industry.
● 5 B2B Products transforming
business of the biggest Property
Developers and Agencies in Australia
● $10B worth of property sold
6
Skychute
PropTech
Development
Breaking new ground using
software in the property industry.
● 5 B2B Products transforming
business of the biggest Property
Developers and Agencies in Australia
● $10B worth of property sold
● 4 new feature deployments a week
with the team of 2 engineers
7
Skychute
PropTech
Development
Breaking new ground using
software in the property industry.
● 5 B2B Products transforming
business of the biggest Property
Developers and Agencies in Australia
● $10B worth of property sold
● 4 new feature deployments a week
with the team of 2 engineers
● 11 programming languages, 4
technology stacks, all sorts of tests
Angular Developer with a
taste for great UI
WANTED
Soup du jour
@limenutt
Soup du jour
● A refresher on GraphQL
@limenutt
Soup du jour
● A refresher on GraphQL
● Real-time API implications
@limenutt
Soup du jour
● A refresher on GraphQL
● Real-time API implications
● Schema-aware applications
@limenutt
Soup du jour
● A refresher on GraphQL
● Real-time API implications
● Schema-aware applications
● Angular toolset
@limenutt
Soup du jour
● A refresher on GraphQL
● Real-time API implications
● Schema-aware applications
● Angular toolset
● Demo!
@limenutt
Is GraphQL for me?
@limenutt
● Client decides what fields to fetch from the API
GraphQL features
@limenutt
● Client decides what fields to fetch from the API
● No underfetching, or overfetching
GraphQL features
@limenutt
● Client decides what fields to fetch from the API
● No underfetching, or overfetching
● Allows to combine multiple data sources
(database and 3rd party APIs) under a single
facade
GraphQL features
@limenutt
● Multiple data sources (databases,
other APIs)
When to use GraphQL
@limenutt
● Multiple data sources (databases,
other APIs)
● Fullstack team
When to use GraphQL
@limenutt
When to use GraphQL
● Multiple data sources (databases,
other APIs)
● Fullstack team
● Tired of adding all these different
response flavours to your REST API
@limenutt
When not to use GraphQL
● API that doesn’t change often
@limenutt
When not to use GraphQL
● API that doesn’t change often
● Legacy API clients that wouldn’t
update to a new API
@limenutt
“Pull” API
Client Server
@limenutt
“Pull” API
Client Server
What’s the status of task #ZZ942α?
@limenutt
“Pull” API
Client Server
What’s the status of task #ZZ942α?
Here is the info for the task #ZZ942α!
@limenutt
“Pull” API
Client Server
What’s the status of task #ZZ942α?
Here is the info for the task #ZZ942α!
What’s the status of task #ZZ942α?
@limenutt
“Pull” API
Client Server
What’s the status of task #ZZ942α?
Here is the info for the task #ZZ942α!
What’s the status of task #ZZ942α?
Here is the info for the task #ZZ942α!
@limenutt
“Pull” API
Client Server
What’s the status of task #ZZ942α?
Here is the info for the task #ZZ942α!
What’s the status of task #ZZ942α?
Here is the info for the task #ZZ942α!
@limenutt
Real-time API
ServerClient
@limenutt
Real-time API
Server
I’m interested in the task #ZZ942α?
Client
@limenutt
Real-time API
Server
I’m interested in the task #ZZ942α?
Here is the current info for the task.
I’ll let you know if something changes.
Client
@limenutt
Real-time API
Server
I’m interested in the task #ZZ942α?
Here is the current info for the task.
I’ll let you know if something changes.
Looks like the progress has been updated.
Client
Real-time API
Server
I’m interested in the task #ZZ942α?
Here is the current info for the task.
I’ll let you know if something changes.
Looks like the progress has been updated.
The task is moved to Backlog.
Client
@limenutt
Real-time API
Server
I’m interested in the task #ZZ942α?
Here is the current info for the task.
I’ll let you know if something changes.
Looks like the progress has been updated.
The task is moved to Backlog.
You can no longer see the task, sorry.
Client
@limenutt
Real-time API Technology
@limenutt
Real-time API Technology
● Long polling
@limenutt
Real-time API Technology
● Long polling
● WebSocket
@limenutt
Real-time API Technology
● Long polling
● WebSocket
● HTTP/2 Bidirectional streaming
@limenutt
Real-time API use cases
@limenutt
Real-time API use cases
● Communication
@limenutt
Real-time API use cases
● Communication
● Collaboration
@limenutt
Real-time API use cases
● Communication
● Collaboration
● Dynamic positioning
@limenutt
Real-time API use cases
● Communication
● Collaboration
● Dynamic positioning
● Analytics / Reporting
@limenutt
Realtime
GraphQL
@limenutt
Real-time GraphQL in Angular app
Real-time GraphQL in Angular app
Real-time GraphQL in Angular app
Real-time GraphQL in Angular app
Real-time GraphQL in Angular app
GraphQL
In Angular
@limenutt
GraphQL in Angular
@limenutt
GraphQL in Angular
Don’t
@limenutt
GraphQL in Angular
Do
Use
graphql-tag
@limenutt
GraphQL in Angular
Do
Use Variables
@limenutt
GraphQL in Angular
Do
Use
GraphQL
for VSCode
@limenutt
GraphQL in Angular
Do
Use
GraphQL
for VSCode
@limenutt
GraphQL in Angular
Do
Use
GraphQL
for VSCode
@limenutt
Useful tools
● GraphQL plugin for VSCode (by Kumar Harsh)
for static checks against the API schema
● graphql-tag package for GraphQL syntax
● WebSocketSubject from rxjs for real-time
@limenutt
Legacy state management
Page Service
data
Fetch
API
Mutate
Component A
Component B
state
state
state
@limenutt
Fetch
Reducer
App reducer
Page 1
Service
data
API
Mutate
Component A
Component B
store
Page 2
Component A
Component B
@limenutt
Cloud reducer
Page 1
data
Component A
Component B
Page 2
Component A
Component B
@limenutt
Cloud reducer
Page 1
data
Component A
Component B
state
Page 2
Component A
Component B
Service
Observe
Mutate
Realtime API
@limenutt
Subscriptions
Component A
Component B
Component C
Component D
Component E
@limenutt
Component A
Component B
Component C
Component D
Component E
Real-time API
@limenutt
Subscriptions
Component A
Component B
Service
Component C
Component D
Component E
Real-time API
@limenutt
Subscriptions
Component A
Component B
ServiceObserve current user
Component C
Component D
Component E
Subscription A
Real-time API
@limenutt
Subscriptions
Component A
Component B
ServiceObserve current user
Observe current user
Component C
Component D
Component E
Subscription A
Subscription B
Real-time API
@limenutt
Subscriptions
Component A
Component B
ServiceObserve current user
Observe current user
Component C
Observe current user
Component D
Component E
Subscription A
Subscription B
Subscription C
Real-time API
@limenutt
Subscriptions
Component A
Component B
ServiceObserve current user
Observe current user
Component C
Observe current user
Component D
Observe current user
Component E
Subscription A
Subscription B
Subscription C
Subscription D
Real-time API
@limenutt
Subscriptions
Component A
Component B
ServiceObserve current user
Observe current user
Component C
Observe current user
Component D
Observe current user
Component E
Observe current user
Subscription A
Subscription B
Subscription C
Subscription D
Subscription E
Real-time API
@limenutt
Subscriptions
Don’t
Component A
Component B
ServiceObserve current user
Observe current user
Component C
Observe current user
Component D
Observe current user
Component E
Observe current user
Subscription A
Subscription B
Subscription C
Subscription D
Subscription E
Performance loss
Real-time API
@limenutt
Do
Component A
Component B
ServiceObserve current user
Observe current user
Component C
Observe current user
Component D
Observe current user
Real-time API
Component E
Observe current user
Current user
Subscription
Cache
@limenutt
List observing
@limenutt
List observing
List / table component
@limenutt
List observing
List / table component
Item 1
Item 2
…...
@limenutt
List observing
List / table component
Item 1
Item 2
…...
Pagination, sorting, filtering
@limenutt
List observing
List / table component Service
Item 1
Item 2
…...
Pagination, sorting, filtering
@limenutt
List observing
List / table component Service
Observe a list of objects
and sub-objects of each
object in the list
Item 1
Item 2
…...
Pagination, sorting, filtering
@limenutt
Don’t
List / table component Service
Observe a list of objects
and sub-objects of each
object in the list
Substandard UX
Item 1
Item 2
…...
Pagination, sorting, filtering
@limenutt
Do
List / table component Service
Observe a list
Item 1
Item 2
…...
Pagination, sorting, filtering
Observe item 1
Observe item 2
@limenutt
Schema awareness
@limenutt
● An application should be resilient to schema changes
Schema awareness
@limenutt
● An application should be resilient to schema changes
● Changes can be anticipated during development
Schema awareness
@limenutt
● An application should be resilient to schema changes
● Changes can be anticipated during development
● Application could react to the schema changes in
real time
Allowing to avoid redeployment in many cases
Schema awareness
@limenutt
Schema awareness
App
@limenutt
Schema awareness
App
UI
@limenutt
Schema awareness
App Schema
UI
@limenutt
Schema awareness
App Schema
Observe
UI
@limenutt
Schema awareness
App Schema
Observe
UI Change
@limenutt
Schema awareness
App Schema
Observe
Update UI
UI Change
@limenutt
Schema-aware app
@limenutt
Schema-aware app
@limenutt
What about server side?
@limenutt
Platform / feature Prisma.io Hasura.io
Schema generation
Resolvers
Real-time
Authentication /
Sign up
Permissions
Validation
@limenutt
Platform / feature Prisma.io Hasura.io
Schema generation
Automatic
Resolvers
Automatic
Real-time Not so great
Authentication /
Sign up
Manual
Permissions Manual
Validation Manual
@limenutt
Platform / feature Prisma.io Hasura.io
Schema generation
Automatic Automatic
Resolvers
Automatic Automatic
Real-time Not so great Great
Authentication /
Sign up
Manual Manual
Permissions Manual Pretty good
Validation Manual Weak
@limenutt
Platform / feature Prisma.io Hasura.io In your dreams
Schema generation
Automatic Automatic Automatic
Resolvers
Automatic Automatic Automatic
Real-time Not so great Great Great
Authentication /
Sign up
Manual Manual Included
Permissions Manual Pretty good Included
Validation Manual Weak Included
Platform / feature Prisma.io Hasura.io In your dreams
Schema generation
Automatic Automatic Automatic
Resolvers
Automatic Automatic Automatic
Real-time Not so great Great Great
Authentication /
Sign up
Manual Manual Included
Permissions Manual Pretty good Included
Validation Manual Weak Included
Real-time GraphQL in Angular app
RRAA
RRAA
RRAA
RRAA
● Complex filtering, sorting, pagination, search
RRAA
● Complex filtering, sorting, pagination, search
● Efficient Real-time support
RRAA
● Complex filtering, sorting, pagination, search
● Efficient Real-time support
● it’s a BAAS!
RRAA
● Complex filtering, sorting, pagination, search
● Efficient Real-time support
● it’s a BAAS!
● Strongly typed client libraries respecting your schema
RRAA
● Complex filtering, sorting, pagination, search
● Efficient Real-time support
● it’s a BAAS!
● Strongly typed client libraries respecting your schema
● Extensive permission and validation rules
RRAA
● Complex filtering, sorting, pagination, search
● Efficient Real-time support
● it’s a BAAS!
● Strongly typed client libraries respecting your schema
● Extensive permission and validation rules
● BYO MongoDB Database
RRAA
● Complex filtering, sorting, pagination, search
● Efficient Real-time support
● it’s a BAAS!
● Strongly typed client libraries respecting your schema
● Extensive permission and validation rules
● BYO MongoDB Database
● Real-time schema awareness
RRAA
● Complex filtering, sorting, pagination, search
● Efficient Real-time support
● it’s a BAAS!
● Strongly typed client libraries respecting your schema
● Extensive permission and validation rules
● BYO MongoDB Database
● Real-time schema awareness
RRAA
Demo app
@limenutt
Book me
1h/week free
code-level help @limenutt
Keep in touch
@limenutt

More Related Content

PDF
Serverless GraphQL for Product Developers
PDF
State management with GraphQL [Angular Minsk, Online, 13.06.20]
PDF
React and GraphQL at Stripe
PDF
GraphQL over REST at Reactathon 2018
PDF
Topo pal does2016
PPTX
Taking Control of your Data with GraphQL
PPTX
DevOps Measurement - DevOpsDays DC
PDF
GraphQL across the stack: How everything fits together
Serverless GraphQL for Product Developers
State management with GraphQL [Angular Minsk, Online, 13.06.20]
React and GraphQL at Stripe
GraphQL over REST at Reactathon 2018
Topo pal does2016
Taking Control of your Data with GraphQL
DevOps Measurement - DevOpsDays DC
GraphQL across the stack: How everything fits together

What's hot (20)

PDF
Part of the pipeline-why continuous testing is essential - velocity conf
PDF
GraphQL: The Missing Link Between Frontend and Backend Devs
PDF
Wrapping and securing REST APIs with GraphQL
PDF
Gartner starting and scaling dev ops
PDF
GraphQL Munich Meetup #1 - How We Use GraphQL At Commercetools
PPTX
GraphQL Introduction
PDF
GraphQL Europe Recap
PDF
TuleapCon2017-CaseStudy_Sleepinnov_Medical_Devices
PDF
Contributing to open source as a non developer - #wclax
PDF
Modular GraphQL with Schema Stitching
PDF
Adding GraphQL to your existing architecture
PDF
TuleapCon 2017-STMicroelectronics-Case-Study
ODP
Elixir absinthe-basics
PDF
Why UI Developers Love GraphQL - Sashko Stubailo, Apollo/Meteor
PDF
Kafka and GraphQL: Misconceptions and Connections | Gerard Klijs, Open Web
PDF
The Apollo and GraphQL Stack
PDF
Frontcon Riga - GraphQL Will Do To REST What JSON Did To XML
PPT
WordPress Development: Tracking Your Code With Version Control
PDF
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
PDF
TuleapCon2017- Requirements traceability Tuleap test tool
Part of the pipeline-why continuous testing is essential - velocity conf
GraphQL: The Missing Link Between Frontend and Backend Devs
Wrapping and securing REST APIs with GraphQL
Gartner starting and scaling dev ops
GraphQL Munich Meetup #1 - How We Use GraphQL At Commercetools
GraphQL Introduction
GraphQL Europe Recap
TuleapCon2017-CaseStudy_Sleepinnov_Medical_Devices
Contributing to open source as a non developer - #wclax
Modular GraphQL with Schema Stitching
Adding GraphQL to your existing architecture
TuleapCon 2017-STMicroelectronics-Case-Study
Elixir absinthe-basics
Why UI Developers Love GraphQL - Sashko Stubailo, Apollo/Meteor
Kafka and GraphQL: Misconceptions and Connections | Gerard Klijs, Open Web
The Apollo and GraphQL Stack
Frontcon Riga - GraphQL Will Do To REST What JSON Did To XML
WordPress Development: Tracking Your Code With Version Control
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
TuleapCon2017- Requirements traceability Tuleap test tool
Ad

Similar to Real-time GraphQL in Angular app (20)

PDF
Real-time GraphQL API with minimum coding and maximum benefit
PDF
Graphql
PDF
apidays LIVE Paris - GraphQL meshes by Jens Neuse
PDF
Support unlimited and ever changing customer experiences with GraphQL by Andr...
PDF
Are you ready to adopt GraphQL?
PDF
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
PDF
Apollo server II
PDF
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
PPTX
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
PPTX
Introduction to GraphQL
PPTX
GraphQL.pptx
PPTX
GraphQL.pptx
PDF
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
PDF
Introduction to GraphQL for beginners
PDF
OutSystsems User Group Netherlands September 2024.pdf
PDF
Intro to GraphQL
PPTX
Build the API you want to see in the world
PPTX
Demand driven Applications with GraphQL
PDF
Introduction to GraphQL
PPTX
GraphQL research summary
Real-time GraphQL API with minimum coding and maximum benefit
Graphql
apidays LIVE Paris - GraphQL meshes by Jens Neuse
Support unlimited and ever changing customer experiences with GraphQL by Andr...
Are you ready to adopt GraphQL?
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
Apollo server II
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
Introduction to GraphQL
GraphQL.pptx
GraphQL.pptx
GraphQL - A query language to empower your API consumers (NDC Sydney 2017)
Introduction to GraphQL for beginners
OutSystsems User Group Netherlands September 2024.pdf
Intro to GraphQL
Build the API you want to see in the world
Demand driven Applications with GraphQL
Introduction to GraphQL
GraphQL research summary
Ad

Recently uploaded (20)

PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Cloud computing and distributed systems.
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
KodekX | Application Modernization Development
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Spectroscopy.pptx food analysis technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPT
Teaching material agriculture food technology
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Review of recent advances in non-invasive hemoglobin estimation
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Machine learning based COVID-19 study performance prediction
Big Data Technologies - Introduction.pptx
Cloud computing and distributed systems.
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Mobile App Security Testing_ A Comprehensive Guide.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Programs and apps: productivity, graphics, security and other tools
Understanding_Digital_Forensics_Presentation.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
KodekX | Application Modernization Development
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Spectroscopy.pptx food analysis technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Teaching material agriculture food technology
sap open course for s4hana steps from ECC to s4
Review of recent advances in non-invasive hemoglobin estimation

Real-time GraphQL in Angular app