Carlos Rufo / 06-02-2020 / GraphQL & Hasura ๐Ÿ‡น๐Ÿ‡ญ

Intro ๐ŸŒ

GraphQL

๐Ÿ‘‹ I'm Carlos

Software ๐Ÿ’ป Consultant

GraphQL ๐Ÿ‡ญ๐Ÿ‡ฐ Organizer

SpaceX ๐Ÿš€ GraphQL API

Agenda

๐Ÿค” What

๐Ÿง Why

๐Ÿคฉ How

๐Ÿค  Q&A

But before start...

It's ๐ŸŽ‰ ๐ŸŽŠ ๐ŸŽˆ
DevJokes Time

Check & contribute ๐Ÿ‘‡
github.com/shrutikapoor08/devjoke

DevJokes time ๐ŸŽ‰

How long does a loop last?

For a while ๐Ÿ˜‚

DevJokes time ๐ŸŽŠ

DevJokes time ๐ŸŽŠ

Why do functions always break up?

Because they have constant arguments.

*๐Ÿฅ ba dum tss

DevJokes time ๐ŸŽŠ

DevJokes time ๐ŸŽˆ

What the developer said to the repository?

FORK YOU! ๐Ÿคฃ

What ๐Ÿค”

  • Specification

  • Query Language

  • Features

  • Comparison

  • Learn

Specification

โŒ It's not a library,
โŒ nor a framework

โœ… Is a language-agnostic
specification to build APIs

Query Language

โœ… Is a Graph QL
to build APIs

โŒ It's not a library,
โŒ nor a framework

Features

๐Ÿ’ช Strongly Typed

๐Ÿ”Ž Introspectable

๐Ÿ“ Queries, Mutations, Subscriptions

โ™ป๏ธ Efficient & Reusable

๐ŸŒ Transport agnostic

โšก๏ธ Product development

Comparison

REST

GraphQL

Comparison

REST

GraphQL

History

๐Ÿ˜… Several clients support need

๐Ÿค” Rethink app data-fetching

๐Ÿ’ก "Write once, run anywhere"

Learn

Confs

GQL Asia ๐Ÿ‡ฎ๐Ÿ‡ณ Feb 20-22ย 

GQL Conf ๐Ÿ‡ฉ๐Ÿ‡ช Jun ?

GQL HK ๐Ÿ‡ญ๐Ÿ‡ฐ Sept ?

GQL Summit ๐Ÿ‡บ๐Ÿ‡ธ Oct 27-28

Tutorials

FullStack GraphQL

Newsletters

GraphQL Weekly

Blogs

Open GraphQL

Why ๐Ÿง

  • Type System

  • Predictability

  • Efficiency

  • Docs & Tooling

Type System

Predictability

Explore your API โœจ

Efficiency

  • Overfetching

  • Underfecthing

โš ๏ธ Common issues in current APIs

Overfetching

Ask for what you need,
get exactly that ๐ŸŽ†

"Fetch more data
that the client
actually needs"

Overfetching

Save resources,
respond faster โšก๏ธ

Efficiency

๐Ÿคฉ Desktop ~ 100% ย 

๐Ÿ˜ง Mobile ~ 60%

๐Ÿ˜ฑ Watch ~ 20%

Reusability

๐Ÿ˜ƒ /desktop/launches

๐Ÿคจ /mobile/launches

๐Ÿ˜ค /watch/launches

Underfetching

Ask for nested resources,
get all of that ๐ŸŽ‡

"Fetch not enough data that the client
actually needs"

Underfetching

Handle data
in your ๐Ÿ“ฑ,
instead over the ๐ŸŒ!

REST

๐Ÿคฉ /launches - 1 HTTP/DB

๐Ÿ˜ง /rocket/:id - 'N' HTTP/DB
๐Ÿ˜ญ Client parse functions

GraphQL

๐Ÿ˜ƒ /graphql - 1 HTTP/'N' DB

๐Ÿ˜Ž No client parse functions

Docs

  • Auto-Generated

  • Typed

  • Up-to-Date

ย 

It'd be ๐Ÿ”ฅ

Tooling

Move faster with
powerful dev tools ๐Ÿ•น

  • In-browser API IDE

  • Auto-Gen Types

  • IDEs extensions

How ๐Ÿคฉ

SpaceX APIs

๐Ÿš€ api.spacex.land/graphql

๐Ÿ›ฐ api.spacex.land/rest

Check & contribute
github.com/spacexland

๐Ÿค  Q&A

(Don't be shy)

Slides

เธ‚เธญเธ‚เธญเธšเธ„เธธเธ“ย ๐Ÿ‡น๐Ÿ‡ญ

What, Why & How GraphQL - GraphQL & Hasura

By Carlos Rufo

What, Why & How GraphQL - GraphQL & Hasura

  • 822