Slide 1

Slide 1 text

GitHub GraphQL API Brooks Swinnerton

Slide 2

Slide 2 text

Hi, I’m Brooks

Slide 3

Slide 3 text

I work at !

Slide 4

Slide 4 text

Today I want to talk about our API

Slide 5

Slide 5 text

March 11, 2008

Slide 6

Slide 6 text

April 8, 2011

Slide 7

Slide 7 text

today’s REST API

Slide 8

Slide 8 text

is endpoint driven

Slide 9

Slide 9 text

is verb driven

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

/repos/:owner/:name/projects ʦʒʒʪ
 verb ʦʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʪ
 endpoint GET

Slide 12

Slide 12 text

[ { "owner_url": "https://api.github.com/repos/bswinnerton/weekend-project", "url": "https://api.github.com/repos/bswinnerton/weekend-project/projects/1", "id": 166, "name": "The Website", "body": "The main website powering my weekend hack project.", "number": 1, "creator": { "login": "bswinnerton", "id": 934497, "avatar_url": "https://avatars2.githubusercontent.com/u/934497?v=3", "gravatar_id": "", "url": "https://api.github.com/users/bswinnerton", "html_url": "https://github.com/bswinnerton", "followers_url": "https://api.github.com/users/bswinnerton/followers", "following_url": "https://api.github.com/users/bswinnerton/following{/ other_user}", "gists_url": "https://api.github.com/users/bswinnerton/gists{/gist_id}", "starred_url": "https://api.github.com/users/bswinnerton/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bswinnerton/subscriptions", "organizations_url": "https://api.github.com/users/bswinnerton/orgs", "repos_url": "https://api.github.com/users/bswinnerton/repos", "events_url": "https://api.github.com/users/bswinnerton/events{/privacy}", "received_events_url": "https://api.github.com/users/bswinnerton/ received_events", "type": "User", "site_admin": true }, "created_at": "2016-09-13T05:25:42Z", "updated_at": "2016-09-13T05:36:56Z" } ]

Slide 13

Slide 13 text

/repos/:owner/:name/projects/:number/columns ʦʒʒʪ
 verb ʦʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʪ
 endpoint GET

Slide 14

Slide 14 text

[ { "project_url": "https://api.github.com/repos/bswinnerton/weekend-project/projects/1", "id": 522, "name": "Up Next", "created_at": "2016-09-13T05:25:48Z", "updated_at": "2016-09-13T05:31:05Z" }, { "project_url": "https://api.github.com/repos/bswinnerton/weekend-project/projects/1", "id": 523, "name": "In Flight", "created_at": "2016-09-13T05:25:52Z", "updated_at": "2016-09-13T05:34:30Z" }, { "project_url": "https://api.github.com/repos/bswinnerton/weekend-project/projects/1", "id": 524, "name": "Awaiting Review", "created_at": "2016-09-13T05:26:01Z", "updated_at": "2016-09-13T05:36:56Z" }, { "project_url": "https://api.github.com/repos/bswinnerton/weekend-project/projects/1", "id": 525, "name": "Done", "created_at": "2016-09-13T05:26:05Z", "updated_at": "2016-09-13T05:35:39Z" } ]

Slide 15

Slide 15 text

/repos/:owner/:name/projects/columns/:id/cards ʦʒʒʪ
 verb ʦʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʒʪ
 endpoint GET

Slide 16

Slide 16 text

[ { "column_url": "https://api.github.com/repos/bswinnerton/weekend-project/projects/ columns/525", "id": 2408, "note": null, "created_at": "2016-09-13T05:34:27Z", "updated_at": "2016-09-13T05:34:27Z", "content_url": "https://api.github.com/repos/bswinnerton/weekend-project/issues/2" }, { "column_url": "https://api.github.com/repos/bswinnerton/weekend-project/projects/ columns/525", "id": 2410, "note": "Find cofounders", "created_at": "2016-09-13T05:35:09Z", "updated_at": "2016-09-13T05:35:09Z" }, { "column_url": "https://api.github.com/repos/bswinnerton/weekend-project/projects/ columns/525", "id": 2409, "note": "Buy domain name", "created_at": "2016-09-13T05:34:43Z", "updated_at": "2016-09-13T05:34:43Z" }, { "column_url": "https://api.github.com/repos/bswinnerton/weekend-project/projects/ columns/525", "id": 2402, "note": "Set up Slack", "created_at": "2016-09-13T05:26:20Z", "updated_at": "2016-09-13T05:26:20Z" } ]

Slide 17

Slide 17 text

this can be painful

Slide 18

Slide 18 text

each request counts against a rate limit

Slide 19

Slide 19 text

data you don’t need

Slide 20

Slide 20 text

which brings us to tomorrow

Slide 21

Slide 21 text

September 14, 2016

Slide 22

Slide 22 text

built on GraphQL

Slide 23

Slide 23 text

what is GraphQL?

Slide 24

Slide 24 text

a query language

Slide 25

Slide 25 text

created by Facebook

Slide 26

Slide 26 text

query {
 viewer {
 name
 }
 }

Slide 27

Slide 27 text

query {
 viewer {
 name
 }
 } { "data": { "viewer": { "name": "Brooks" } } }

Slide 28

Slide 28 text

it’s introspectable

Slide 29

Slide 29 text

it’s typed

Slide 30

Slide 30 text

let’s take it for a spin

Slide 31

Slide 31 text

!

Slide 32

Slide 32 text

why GraphQL?

Slide 33

Slide 33 text

you get the data you need

Slide 34

Slide 34 text

in one request

Slide 35

Slide 35 text

you get the data you need

Slide 36

Slide 36 text

when new UI features are released

Slide 37

Slide 37 text

we use GraphQL in production

Slide 38

Slide 38 text

early access

Slide 39

Slide 39 text

we want your feedback

Slide 40

Slide 40 text

which schemas do you need?

Slide 41

Slide 41 text

where can we offer better tooling?

Slide 42

Slide 42 text

what’s confusing about the GraphQL API?

Slide 43

Slide 43 text

Learn more Check out tomorrow’s talk: Updating our Platform to help integrators ship
 http://githubengineering.com 
 https://developer.github.com
 
 https://platform.github.community

Slide 44

Slide 44 text

https://developer.github.com

Slide 45

Slide 45 text

https://platform.github.community

Slide 46

Slide 46 text

Come find us

Slide 47

Slide 47 text

Q&A

Slide 48

Slide 48 text

FIN