GraphQL 

for the impatient

Julián Duque

Lead Developer Advocate @ Heroku

https://twitch.tv/julianduque - @julian_duque

Introduction

GraphQL

  • Query and manipulation language specification for APIs
    • Just one API endpoint
    • Multiple queries defined by a schema
  • Alternative to REST
  • Developed by Facebook in 2012
  • Released to the public in 2015

Schema & Types

Scalar Types

  • Int: A signed 32-bit integer
  • Float: A signed double-precision floating-point value
  • String: A UTF-8 character sequence
  • Boolean: true or false
  • ID: A scalar representing a unique identifier
  • Custom scalars can also be created, examples are:
    • Date
    • JSON

Object Types

Queries & Mutations

Queries

Mutations

Resolvers

Query Resolvers

Mutation Resolvers

Running GraphQL

Apollo Server

Thank You! 😄