Sajeetharan Sinnathurai
With over 13 years of experience in the IT industry, Sajeetharan is a Cloud Solution Architect, an enthusiast in Cloud and Opensource.He currently works at Microsoft as a Senior Program Manager in the CosmosDB team
by Sajeetharan | @kokkisajee
Postman API DAY
In a nutshell
Communities
Social Developer
Recognitions
Product Manager @Microsoft
First GDE,MCT and MVP from SL
Top stackoverflow contributor
@sajeetharan
@kokkisajee
@sajeetharan
@sajeetharan
👍An “Intermediate session"
👍It won’t teach you everything, But it will help you learn what you need to know to get started
👍Be ready to ask questions
👍Celebrate together!
Introduction to API, GraphQL concepts
Get our hands dirty
@kokkisajee
Server
1. Request
2. HTML
@kokkisajee
Server
1. Request
2. HTML
Many more
@kokkisajee
@kokkisajee
Issue#1 Multiple round trips
Issue#2 Over-fetching of data
While requesting nested data, we often have to make several round trips or define an entirely newend point
Wouldn't it be nice if client receives only the data that it requires?
Issue#3 Absence of Self-Documentation
The onus lies with the developer to document the API and allow exploration and discovery of your APIs.
@kokkisajee
@kokkisajee
http://graphql.org/
@kokkisajee
GET /movies/1
{
"title": "The Greatest Showman",
"director": {
"firstName": "Michael",
"lastName": "Gracey"
}
// ... more fields
}
@kokkisajee
GET /movies/1
{
"title": "The Greatest Showman",
"directorId": 1
// ... more fields
}
GET /directors/1
{
"firstName": "Michael",
"lastName": "Gracey"
// ... more fields
}
@kokkisajee
GET /graphql?query={ movie(id: "1") { title, author { firstName } } }
{
"title": "The Greatest Showman",
"director": {
"firstName": "Michael"
}
}
@kokkisajee
@kokkisajee
Query
Mutation
Subscription
Basic concepts
@kokkisajee
@kokkisajee
query GET_MAIN_DATA {
me {
}
}
name
bio
avatarLg: avatar_url(size: 168)
avatarSm: avatar_url(size: 40)
socials {
url
}
photos(limit: 3) {
src
}
friends(limit: 3) {
name
avatar_url(size: 100)
}
Query : Example
@kokkisajee
@kokkisajee
mutation CREATE_POST($value: String!) {
createPost(value: $value) {
}
}
author {
name
avatar_url(size: 40)
}
body
id
date
...
@kokkisajee
@kokkisajee
subscription FEED_UPDATES {
postAdded {
}
}
author {
name
avatar_url(size: 40)
}
body
id
date
...
@kokkisajee
@kokkisajee
Sufficiently Powerful
Hard to Misuse and easy to maintain
Appropriate to Audience and easy to expand
Easy to Learn and use even without documentation
@kokkisajee
Recurring Operations
Environment Configuration (For performance testing)
Automated Graphql API tests
Test Data Generation
Exploratory API Testing
@kokkisajee
@kokkisajee
@kokkisajee
@kokkisajee
@kokkisajee
I'm open to questions!
Q&A
@kokkisajee
@kokkisajee
By Sajeetharan Sinnathurai
Offline-first apps need to support: intermittent connectivity, transition seamlessly between online and offline states, reliable CRUD on-device data, data synchronisation and data conflict resolution to enable real-time collaboration. Amplify DataStore is an on device persistent repository for interacting with local data and able to automatically synchronize via GraphQL. Using Amplify DataStore will allow us to implement offline-first while using a simple programming model.
With over 13 years of experience in the IT industry, Sajeetharan is a Cloud Solution Architect, an enthusiast in Cloud and Opensource.He currently works at Microsoft as a Senior Program Manager in the CosmosDB team