timothydang / graphql-workshop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GraphQL workshop

Introduction

The goal of the workshop is to create your own GraphQL-server that acts as a gateway on top of a few REST-services.

In this workshop we will be covering:

  • Creating a Hello World GraphQL-app
  • Proxying requests from existing REST-service
  • Tying different data types in your REST-service together in a graph

Getting started

npm i
npm run dev

URLs

Test query

Start by opening http://localhost:8100 (after npm run dev) to see your GraphQL playground and get familiar with the project.

Try this query:

{
  hello(name: "Harry")
}

Understand the existing Posts and Users data

Tasks

  1. Implement a Post resolver so we can query for our list of Posts.
  2. Implement a User resolver so we can query for all users.
  3. Implement User resolver inside Post to retrieve firstName and lastName.
  4. Add limit parameter to our Posts and Users query.
  5. Add Ability to add users, posts using mutations.

About


Languages

Language:JavaScript 100.0%