GraphQL 

for the impatient

Julián Duque

Developer and Educator

https://julianduque.co - @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! 😄

Slides and code can be found in:

https://julianduque.co/graphql-impatient

GraphQL for the impatient

By Julián Duque

GraphQL for the impatient

A brief introduction to GraphQL in Node.js

  • 1,085