SlideShare a Scribd company logo
1 of 22
Download to read offline
Meetup #ParisAPI
06/28/2017
How fiddling with GraphQL enhanced communication
between our back and front developers
by Davy Peter Braun
Senior Frontend Engineer @ CALLR
Meetup #ParisAPI - By @davypeterbraun 2
CALLR - Global Voice and SMS services company
- Use-cases cover user acquisition/engagement, person-to-person
communications, much more...
- SMS and voice notifications (integrate to your app using API)
- Call tracking (get extra data from your tracked phone numbers)
- Custom IVR (Interactive Voice Response)
Meetup #ParisAPI - By @davypeterbraun 3
Development at CALLR (in a nutshell)
- Telecoms’ stack — “exotic” from a classic web developer’s POV
- 3 frontend (Angular), 3 backend (PHP) + 3 devops
- Communication barriers do happen...
Meetup #ParisAPI - By @davypeterbraun 4
We use JSON-RPC, not REST
- JSON-RPC
Stateless, very simple, lightweight, remote procedure call built
using the JSON format.
- Send a Request Object with structured fields
Single endpoint where you POST your request
jsonrpc, method, params (optional), id (optional)
- Receive a Response Object
jsonrpc, result (optional), error (optional), id
Meetup #ParisAPI - By @davypeterbraun 5
We use JSON-RPC, not REST
- RPC call with positional parameters
--> {"jsonrpc": "2.0", "method": "subtract", "params": [42, 23], "id": 1}
<-- {"jsonrpc": "2.0", "result": 19, "id": 1}
- RPC call with positional parameters
--> {
"jsonrpc": "2.0", "method": "subtract",
"params": {"subtrahend": 23, "minuend": 42}, "id": 3
}
<-- {"jsonrpc": "2.0", "result": 19, "id": 1}
Meetup #ParisAPI - By @davypeterbraun 6
We use JSON-RPC, not REST
- Batch requests
Send an array of request objects, and server returns an array of
corresponding responses
Meetup #ParisAPI - By @davypeterbraun 7
We use JSON-RPC, not REST
Send...
[
{"jsonrpc": "2.0", "method": "sum", "params": [1,2,4], "id": "1"},
{"jsonrpc": "2.0", "method": "notify_hello", "params": [7], "id": "2"},
{"foo": "boo"},
{"jsonrpc": "2.0", "method": "foo.get", "params": {"name": "myself"}, "id": "5"},
]
Meetup #ParisAPI - By @davypeterbraun 8
We use JSON-RPC, not REST
Receive...
[
{"jsonrpc": "2.0", "result": 7, "id": "1"},
{"jsonrpc": "2.0", "result": 19, "id": "2"},
{
"jsonrpc": "2.0", "error": {"code": -32600, "message":
"Invalid Request"}, "id": null
},
{"jsonrpc": "2.0", "result": ["hello", 5], "id": "5"}
]
Meetup #ParisAPI - By @davypeterbraun 9
How we try to minimize communications issues
- Well-rounded project managers
- Make sure project priorities are clearly outlined
- Shifted to a “user stories” based process encompassing both front
and back at the same time
Meetup #ParisAPI - By @davypeterbraun 10
Informal chit-chat leads to ad-hoc workshop
- Subject brought up by frontend devs, because React
- GraphQL == hype — the name rings everyone’s bell
- Heated conversation — “hype” or “progress”?
Meetup #ParisAPI - By @davypeterbraun 11
GraphQL
- Query language and a server-side runtime, for your API, on top of
your existing data / backend storage system(s)
- GraphQL service
- Define types
- Define fields on those types
- Provide functions to resolve each fields you may query
- Using w/o Relay (i.e. w/ Angular)?
-> POST GraphQL commands into back-ticked query strings
- Single HTTP endpoint fed with POST!
Meetup #ParisAPI - By @davypeterbraun 12
GraphQL
Type definitions
type Query {
user: User
}
type User {
id: ID
skills: [Skill]
name: String
company: String
}
type Skill {
name: String
techRelated: Boolean
proYears: Int
getsPaidForIt: Boolean
}
GraphQL query
{
user {
name
company
skills {
name
techRelated
}
}
}
GraphQL server-side response
{
"user": {
"name": "Davy Braun",
"Company": "CALLR",
"skills": [
{
"name": "Coding",
"techRelated": true
},
{
"name": "Branding",
"techRelated": false
},
{
"name": "Trading",
"techRelated": false
]
}
}
Meetup #ParisAPI - By @davypeterbraun 13
GraphQL
- Backend implementation relies on resolvers functions
- Query several data sources (e.g. different DBs)
at once transparently from the frontend
“Yeah that’s a bit like what we already have,
OK, bye”
TL;DR — ”what we have is better”
Or is it?
Meetup #ParisAPI - By @davypeterbraun 15
What could GraphQL help us with?
Make API
changes a
softer XP
Sweeter delivery
of data
Teambuilding Brand awareness
Meetup #ParisAPI - By @davypeterbraun 16
1/ Making API changes a softer experience
- If method is not new and changes, bump API version
- If method is new, add it (bump API version maybe?)
- Changes w/o API version bump -> breaking changes :(
- Many API versions -> technical debt grows :(
- Update docs, update SDKs (...ahem) :(
- Impedes continuous delivery :(
Meetup #ParisAPI - By @davypeterbraun 17
PEOPLE DON’T WANT
TO CHANGE CODE WHEN
OUR API CHANGE
Meetup #ParisAPI - By @davypeterbraun 18
2/ Sweeter delivery of data to the frontend
- Declarative style
Tell the server what you need. Not how you want to get it.
- Compositionality
Achieve better flexibility in your code composing/combining
fragments and queries
- Strong typing
Already hooked on TypeScript (strongly typed)
Meetup #ParisAPI - By @davypeterbraun 19
3/ Teambuilding...
- Yay! Brand new toy!
- Slowly building up a new, shared expertise
- It does add a line on our resume...
Meetup #ParisAPI - By @davypeterbraun 20
4/ …and brand awareness / visibility
- Expertise turned into content marketing, blog posts…
- Makes our “exotic” stack shine a little more in job fairs
- Allow us to come talk to you!
Let’s round up
Meetup #ParisAPI
06/28/2017
THANKS
I tweet, you tweet, everyone tweets
@davypeterbraun
by Davy Peter Braun
Senior Frontend Engineer @ CALLR

More Related Content

Similar to How GraphQL Enhanced Communication at CALLR

Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...François-Guillaume Ribreau
 
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIsThe liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIsJorge Ferrer
 
Generating Unified APIs with Protocol Buffers and gRPC
Generating Unified APIs with Protocol Buffers and gRPCGenerating Unified APIs with Protocol Buffers and gRPC
Generating Unified APIs with Protocol Buffers and gRPCC4Media
 
20170624 GraphQL Presentation
20170624 GraphQL Presentation20170624 GraphQL Presentation
20170624 GraphQL PresentationMartin Heidegger
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedMarcinStachniuk
 
Microsoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needsMicrosoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needsMicrosoft Tech Community
 
Microsoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needsMicrosoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needsMicrosoft Tech Community
 
Tadhack madrid June 2014: Joris Swinnen and WebRTC Nederland "Invite my colle...
Tadhack madrid June 2014: Joris Swinnen and WebRTC Nederland "Invite my colle...Tadhack madrid June 2014: Joris Swinnen and WebRTC Nederland "Invite my colle...
Tadhack madrid June 2014: Joris Swinnen and WebRTC Nederland "Invite my colle...Bart Uelen
 
Business-friendly library for inter-service communication
Business-friendly library for inter-service communicationBusiness-friendly library for inter-service communication
Business-friendly library for inter-service communicationPivorak MeetUp
 
Building Your First App with MongoDB
Building Your First App with MongoDBBuilding Your First App with MongoDB
Building Your First App with MongoDBMongoDB
 
apidays LIVE Paris - Automation API Testing by Guillaume Jeannic
apidays LIVE Paris - Automation API Testing by Guillaume Jeannicapidays LIVE Paris - Automation API Testing by Guillaume Jeannic
apidays LIVE Paris - Automation API Testing by Guillaume Jeannicapidays
 
API-Entwicklung bei XING
API-Entwicklung bei XINGAPI-Entwicklung bei XING
API-Entwicklung bei XINGMark Schmidt
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedMarcinStachniuk
 
Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCTim Burks
 
APIfying an ERP - ongoing saga
APIfying an ERP - ongoing sagaAPIfying an ERP - ongoing saga
APIfying an ERP - ongoing sagaMarjukka Niinioja
 
Connecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL EndpointsConnecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL EndpointsJulien Bataillé
 
Developing and Deploying Apps with the Postgres FDW
Developing and Deploying Apps with the Postgres FDWDeveloping and Deploying Apps with the Postgres FDW
Developing and Deploying Apps with the Postgres FDWJonathan Katz
 

Similar to How GraphQL Enhanced Communication at CALLR (20)

Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
 
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIsThe liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
 
Generating Unified APIs with Protocol Buffers and gRPC
Generating Unified APIs with Protocol Buffers and gRPCGenerating Unified APIs with Protocol Buffers and gRPC
Generating Unified APIs with Protocol Buffers and gRPC
 
20170624 GraphQL Presentation
20170624 GraphQL Presentation20170624 GraphQL Presentation
20170624 GraphQL Presentation
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
 
Switch to Backend 2023
Switch to Backend 2023Switch to Backend 2023
Switch to Backend 2023
 
Microsoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needsMicrosoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needs
 
Microsoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needsMicrosoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needs
 
API for Beginners
API for BeginnersAPI for Beginners
API for Beginners
 
Tadhack madrid June 2014: Joris Swinnen and WebRTC Nederland "Invite my colle...
Tadhack madrid June 2014: Joris Swinnen and WebRTC Nederland "Invite my colle...Tadhack madrid June 2014: Joris Swinnen and WebRTC Nederland "Invite my colle...
Tadhack madrid June 2014: Joris Swinnen and WebRTC Nederland "Invite my colle...
 
Business-friendly library for inter-service communication
Business-friendly library for inter-service communicationBusiness-friendly library for inter-service communication
Business-friendly library for inter-service communication
 
Building Your First App with MongoDB
Building Your First App with MongoDBBuilding Your First App with MongoDB
Building Your First App with MongoDB
 
apidays LIVE Paris - Automation API Testing by Guillaume Jeannic
apidays LIVE Paris - Automation API Testing by Guillaume Jeannicapidays LIVE Paris - Automation API Testing by Guillaume Jeannic
apidays LIVE Paris - Automation API Testing by Guillaume Jeannic
 
API-Entwicklung bei XING
API-Entwicklung bei XINGAPI-Entwicklung bei XING
API-Entwicklung bei XING
 
Life on Clouds: a forensics overview
Life on Clouds: a forensics overviewLife on Clouds: a forensics overview
Life on Clouds: a forensics overview
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
 
Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPC
 
APIfying an ERP - ongoing saga
APIfying an ERP - ongoing sagaAPIfying an ERP - ongoing saga
APIfying an ERP - ongoing saga
 
Connecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL EndpointsConnecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL Endpoints
 
Developing and Deploying Apps with the Postgres FDW
Developing and Deploying Apps with the Postgres FDWDeveloping and Deploying Apps with the Postgres FDW
Developing and Deploying Apps with the Postgres FDW
 

Recently uploaded

Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝soniya singh
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceanilsa9823
 
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...Niamh verma
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7Pooja Nehwal
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceanilsa9823
 
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...wyqazy
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Pooja Nehwal
 

Recently uploaded (7)

Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Shalimar Bagh Delhi reach out to us at 🔝8264348440🔝
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
 
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
 
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
 

How GraphQL Enhanced Communication at CALLR

  • 1. Meetup #ParisAPI 06/28/2017 How fiddling with GraphQL enhanced communication between our back and front developers by Davy Peter Braun Senior Frontend Engineer @ CALLR
  • 2. Meetup #ParisAPI - By @davypeterbraun 2 CALLR - Global Voice and SMS services company - Use-cases cover user acquisition/engagement, person-to-person communications, much more... - SMS and voice notifications (integrate to your app using API) - Call tracking (get extra data from your tracked phone numbers) - Custom IVR (Interactive Voice Response)
  • 3. Meetup #ParisAPI - By @davypeterbraun 3 Development at CALLR (in a nutshell) - Telecoms’ stack — “exotic” from a classic web developer’s POV - 3 frontend (Angular), 3 backend (PHP) + 3 devops - Communication barriers do happen...
  • 4. Meetup #ParisAPI - By @davypeterbraun 4 We use JSON-RPC, not REST - JSON-RPC Stateless, very simple, lightweight, remote procedure call built using the JSON format. - Send a Request Object with structured fields Single endpoint where you POST your request jsonrpc, method, params (optional), id (optional) - Receive a Response Object jsonrpc, result (optional), error (optional), id
  • 5. Meetup #ParisAPI - By @davypeterbraun 5 We use JSON-RPC, not REST - RPC call with positional parameters --> {"jsonrpc": "2.0", "method": "subtract", "params": [42, 23], "id": 1} <-- {"jsonrpc": "2.0", "result": 19, "id": 1} - RPC call with positional parameters --> { "jsonrpc": "2.0", "method": "subtract", "params": {"subtrahend": 23, "minuend": 42}, "id": 3 } <-- {"jsonrpc": "2.0", "result": 19, "id": 1}
  • 6. Meetup #ParisAPI - By @davypeterbraun 6 We use JSON-RPC, not REST - Batch requests Send an array of request objects, and server returns an array of corresponding responses
  • 7. Meetup #ParisAPI - By @davypeterbraun 7 We use JSON-RPC, not REST Send... [ {"jsonrpc": "2.0", "method": "sum", "params": [1,2,4], "id": "1"}, {"jsonrpc": "2.0", "method": "notify_hello", "params": [7], "id": "2"}, {"foo": "boo"}, {"jsonrpc": "2.0", "method": "foo.get", "params": {"name": "myself"}, "id": "5"}, ]
  • 8. Meetup #ParisAPI - By @davypeterbraun 8 We use JSON-RPC, not REST Receive... [ {"jsonrpc": "2.0", "result": 7, "id": "1"}, {"jsonrpc": "2.0", "result": 19, "id": "2"}, { "jsonrpc": "2.0", "error": {"code": -32600, "message": "Invalid Request"}, "id": null }, {"jsonrpc": "2.0", "result": ["hello", 5], "id": "5"} ]
  • 9. Meetup #ParisAPI - By @davypeterbraun 9 How we try to minimize communications issues - Well-rounded project managers - Make sure project priorities are clearly outlined - Shifted to a “user stories” based process encompassing both front and back at the same time
  • 10. Meetup #ParisAPI - By @davypeterbraun 10 Informal chit-chat leads to ad-hoc workshop - Subject brought up by frontend devs, because React - GraphQL == hype — the name rings everyone’s bell - Heated conversation — “hype” or “progress”?
  • 11. Meetup #ParisAPI - By @davypeterbraun 11 GraphQL - Query language and a server-side runtime, for your API, on top of your existing data / backend storage system(s) - GraphQL service - Define types - Define fields on those types - Provide functions to resolve each fields you may query - Using w/o Relay (i.e. w/ Angular)? -> POST GraphQL commands into back-ticked query strings - Single HTTP endpoint fed with POST!
  • 12. Meetup #ParisAPI - By @davypeterbraun 12 GraphQL Type definitions type Query { user: User } type User { id: ID skills: [Skill] name: String company: String } type Skill { name: String techRelated: Boolean proYears: Int getsPaidForIt: Boolean } GraphQL query { user { name company skills { name techRelated } } } GraphQL server-side response { "user": { "name": "Davy Braun", "Company": "CALLR", "skills": [ { "name": "Coding", "techRelated": true }, { "name": "Branding", "techRelated": false }, { "name": "Trading", "techRelated": false ] } }
  • 13. Meetup #ParisAPI - By @davypeterbraun 13 GraphQL - Backend implementation relies on resolvers functions - Query several data sources (e.g. different DBs) at once transparently from the frontend
  • 14. “Yeah that’s a bit like what we already have, OK, bye” TL;DR — ”what we have is better” Or is it?
  • 15. Meetup #ParisAPI - By @davypeterbraun 15 What could GraphQL help us with? Make API changes a softer XP Sweeter delivery of data Teambuilding Brand awareness
  • 16. Meetup #ParisAPI - By @davypeterbraun 16 1/ Making API changes a softer experience - If method is not new and changes, bump API version - If method is new, add it (bump API version maybe?) - Changes w/o API version bump -> breaking changes :( - Many API versions -> technical debt grows :( - Update docs, update SDKs (...ahem) :( - Impedes continuous delivery :(
  • 17. Meetup #ParisAPI - By @davypeterbraun 17 PEOPLE DON’T WANT TO CHANGE CODE WHEN OUR API CHANGE
  • 18. Meetup #ParisAPI - By @davypeterbraun 18 2/ Sweeter delivery of data to the frontend - Declarative style Tell the server what you need. Not how you want to get it. - Compositionality Achieve better flexibility in your code composing/combining fragments and queries - Strong typing Already hooked on TypeScript (strongly typed)
  • 19. Meetup #ParisAPI - By @davypeterbraun 19 3/ Teambuilding... - Yay! Brand new toy! - Slowly building up a new, shared expertise - It does add a line on our resume...
  • 20. Meetup #ParisAPI - By @davypeterbraun 20 4/ …and brand awareness / visibility - Expertise turned into content marketing, blog posts… - Makes our “exotic” stack shine a little more in job fairs - Allow us to come talk to you!
  • 22. Meetup #ParisAPI 06/28/2017 THANKS I tweet, you tweet, everyone tweets @davypeterbraun by Davy Peter Braun Senior Frontend Engineer @ CALLR