Giter Site home page Giter Site logo

graphql-relay's Introduction

GraphQL+Relay

Oftentimes, GraphQL is compared to RESTful architecture. When it's the shortest path for those developers who are experienced in API development, for which REST has been standard for years, newbies may get lost when being told about resources, endpoints, HTTP methods and such. The goal of this tutorial is to teach GraphQL from ground zero, as if you knew completely nothing about API development.

What this course does and does not cover

Covers:

  • History of GraphQL and its predecessor, RESTful architecture.
  • GraphQL query syntax.
  • Writing GraphQL schema and using it with Relay.

Does not cover:

  • GraphQL mutations: we only learn queries (fetching data) and don't look at mutations (updating data at the original source).
  • Relay.Route. It implements feature that can be easily implemented with RelayContainer, therefore no need to learn it directly.

TOC

Module 1: Why GraphQL

  1. Why does your web app need an API?
  2. How APIs have been developed before GraphQL?
  3. What are the aspects GraphQL beats REST? (even if, at first, it feels nonsensical)
  4. Who stands behind GraphQL and what big companies are early adopters?
  5. What is Relay, and what are Relay containers, query composition and
  6. Getting hands dirty: a Netflix clone!

Module 2: GraphQL Schema

  1. GraphQL schema and its relation to data storage and other services.
  2. On the back-end: how to provide a GraphQL API that would respond to GraphQL requests.
  3. Implementation of the GraphQL API back-end.
  4. On the front-end: how to perform a query against remote GraphQL server, what do we need to know and what to expect.
  5. Using HTTP as transport, /graphql as the only endpoint and fetch API to query a GraphQL endpoint. Old-school way to query an API.
  6. Querying a GraphQL API as if it was a REST endpoint in React.

Module 3: How to Relay

  1. What is Relay and why, just sometimes, it's overkill.
  2. Relay is full-stack. Writing and generating GraphQL schema for both back-end and front-end.
  3. Relay building blocks: RelayContainer, fragments and queries.
  4. Relay container composition. Declaring fragments separately to save lines of code and help Relay make optimizations.
  5. Implementation of Relay layer in React app.

Module 4: Wrap up

  1. Review of the resulting codebase to sum things up.

See also:

graphql-relay's People

Contributors

azat-co avatar taxigy avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

taxigy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.