GraphQL, Apollo & React

khriztianmoreno.com

@khriztianmoreno

Cristian Moreno

I'm a community leader and altruistic speaker.

FullStack Javascript Developer

<Commit.fm /> Podcast
https://spoti.fi/2EfgTlu

 Global Azure Bootcamp 2019

Hiring!!!

Senior Frontend Developer

GraphQL

khriztianmoreno.com

@khriztianmoreno

2012

GraphQL created at Facebook

2013

React is released

2014

React Native is released

2015

GraphQL is open sourced

Relay Classic is open sourced

2016

New GraphQL website graphql.org

First GraphQL Summit

GitHub announces GraphQL API

2017

Relay Modern 1.0

Apollo Client 2.0

Implementations

Who is using it?

GraphQL

khriztianmoreno.dev

@khriztianmoreno

REST

  • It's just a convention.
  • The server exposes resources.
  • Usually, send more information.
  • Multiple requests per view
  • Documentation outside development
  • It is a typed and validatable language
  • The client defines what he receives
  • Only what is necessary is sent
  • 1 one request per view
  • Documentation by definition

GraphQL Schemas and Types

khriztianmoreno.com

@khriztianmoreno

Type System

  • Scalar Types: Int, Float, String, Boolean, ID
  • Entry points: Query, Mutation, Subscription

khriztianmoreno.com

@khriztianmoreno

Schema Syntax

- Optional: String
- Mandatory: String!
- Arrays: [String]

khriztianmoreno.com

@khriztianmoreno

Apollo Client

khriztianmoreno.com

@khriztianmoreno

Apollo

Cache

Apollo

Link

Apollo Client

khriztianmoreno.com

@khriztianmoreno

Using GraphQL

Why use GraphQL?

  • Declarative
  • De-coupled from storage
  • Validated and structured
  • Facilitates Collaboration
  • Super fast

Workshop Repository

khriztianmoreno.com

@khriztianmoreno

@khriztianmoreno

Thanks 🙇🏼 🙏🏼 👨🏼‍💻

GraphQL Apollo-Client Workshop

By Tarun Sharma

GraphQL Apollo-Client Workshop

GraphQL is a fan favorite for good reason. It lets a client make specific, complex, and/or aggregate queries for data, and it’s user-friendly to boot. If you’ve been meaning to learn GraphQL and start harnessing its powers, this is a great place to start. This course is for GraphQL newbies with a basic understanding of React. It focuses on the client-side implementation of GraphQL usage using the Apollo client. We’ll start with a guide on how to add the Apollo client to an existing project, then move on using the Query and Mutation components to fetch and manipulate data using a GraphQL API.

  • 308