Making design more human with GraphQL

A presentation at GraphQL Conf in June 2019 in Berlin, Germany by Bernardo Raposo

Slide 1

Slide 1

Making design more human with GraphQL

#GraphQLConf

Slide 2

Slide 2

Making design more human with GraphQL Hi! I’m Bernardo

TravelRepublic @braposo @braposo

Slide 3

Slide 3

Making design more human with GraphQL Design @braposo GraphQL

Slide 4

Slide 4

Making design more human with GraphQL @braposo Evolution of design tools

Slide 5

Slide 5

Making design more human with GraphQL From dumb to smart @braposo

Slide 6

Slide 6

Making design more human with GraphQL @braposo Figma API figma.com/developers

Slide 7

Slide 7

Making design more human with GraphQL Multiple endpoints GET /v1/files/:key GET /v1/images/:key GET /v1/teams/:team_id/projects GET /v1/projects/:project_id/files GET /v1/files/:key/comments POST /v1/files/:key/comments GET /v1/teams/:team_id/components GET /v1/teams/:team_id/styles @braposo

Slide 8

Slide 8

Making design more human with GraphQL Rigid tree structure { } “id”: “0:1”, “name”: “Assets”, “type”: “CANVAS”, “children”: [ { “id”: “20:25”, “name”: “Box”, “type”: “COMPONENT”, “children”: [ { “id”: “12:5”, … @braposo

Slide 9

Slide 9

Making design more human with GraphQL Let’s see an example @braposo

Slide 10

Slide 10

Making design more human with GraphQL Get all text styles in a specific frame @braposo

Slide 11

Slide 11

Making design more human with GraphQL Get all text styles in a specific frame @braposo

  1. Fetch file data
  2. Get the styles page
  3. Get the typography frame
  4. Extract font styles from each group

Slide 12

Slide 12

Making design more human with GraphQL @braposo

Slide 13

Slide 13

@braposo Making design more human with GraphQL Get all text styles in a specific frame [ { } … “name”: “caption”, “styles”: { “large”: { “family”: “Arimo”, “size”: “16px”, “weight”: 400, “lineheight”: “140%”, “spacing”: “3.2px” }, … }

Slide 14

Slide 14

Making design more human with GraphQL What if we could use something simpler? @braposo

Slide 15

Slide 15

Making design more human with GraphQL Get all text styles in a specific frame file(id: “fileID”) { pages(name: “styles”) { frames(name: “typography”) { groups { name texts { name styles { fontSize fontFamily fontWeight } … } @braposo

Slide 16

Slide 16

Making design more human with GraphQL It’s just GraphQL™ @braposo

Slide 17

Slide 17

Making design more human with GraphQL figma-graphql figma-graphql.party @braposo

Slide 18

Slide 18

@braposo Making design more human with GraphQL v2 available today Rebuilt in TypeScript Human-first API figma-graphql.party

Slide 19

Slide 19

Making design more human with GraphQL @braposo

Slide 20

Slide 20

Making design more human with GraphQL Designer Developer @braposo Manager

Slide 21

Slide 21

Making design more human with GraphQL Designer @braposo Get the background colours of all the global styles to update their Design System documentation

Slide 22

Slide 22

Making design more human with GraphQL Designer { } file(id: “fileID”) { styles(type:FILL) { name styles { color { r g b } } } } @braposo

Slide 23

Slide 23

Making design more human with GraphQL Developer Export all icons in a design document to generate up-to-date React components @braposo

Slide 24

Slide 24

Making design more human with GraphQL Developer { } file(id: “fileID”) { pages(name: “Icons”) { components { name size { width height } export(format: svg) } } } @braposo

Slide 25

Slide 25

Making design more human with GraphQL Manager @braposo Get the screenshots of the prototype screens for a few different features to present at a product meeting

Slide 26

Slide 26

Making design more human with GraphQL Manager { } projects(teamId: “teamID”) { featureA: files(name: “Feature A”) { pages(name: “Prototype”) { frames { name export(format: jpg) } } } … } @braposo

Slide 27

Slide 27

Making design more human with GraphQL GraphQL makes design more human @braposo

Slide 28

Slide 28

Making design more human with GraphQL @braposo GraphQL makes technology more human

Slide 29

Slide 29

Making design more human with GraphQL @braposo Complex systems become accessible to everyone

Slide 30

Slide 30

Making design more human with GraphQL Human-first API @braposo

Slide 31

Slide 31

Making design more human with GraphQL @braposo

Slide 32

Slide 32

Making design more human with GraphQL How can we make our systems more human? @braposo

Slide 33

Slide 33

@braposo Making design more human with GraphQL Special thanks: Sara @NikkitaFTW

Thank you!

Andrey @okonetchnikov

Jon @jongold @braposo