GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.
3. Traditional Client - Server relationship
3
App
Server
iOS
View1
Droid
View1
Web
View2
Data(id: 10)
Data(id: 10)
Data(id: 10)
Model
Model
Model
4. Traditional Client - Server relationship
4
App
Server
iOS
Complex View
Data1(id: 10)
Data 2(id: 10)
Data 3(id: 10)
Model 1
Model 2
Model 3
Sad Server Slow App
N + 1 Query Problem
5. GraphQL Client - Server relationship
5
App
Server
iOS
Complex View
Capabilities (Type System)
Requirements (data queries)
Type System
6. GraphQL Client - Server relationship
6
App
Server
iOS
Complex View
Data Shape
Client Specific Data
Type System
Slow App
8. TYPE SYSTEM
Type System
Object Types and Fields
Arguments
The Query and Mutation Types
Scalar Types
Enumeration Types
Lists and Non-Null
Interfaces 8
15. GRAPHQL SUBSCRIPTION
15
Create
Source
Subscribe to the pub sub service
Watch for database writes / listen for triggers
Process the Kafka Stream
Listen to incoming http calls
Incoming stock prices per tick
or anything which could create an event stream