Skip to content

Commit

Permalink
Add navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauri Svan committed Nov 30, 2020
1 parent 6b112a3 commit 8b98821
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 23 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ As a part of this workshop, we will
1. Write a simple React frontendto connect to the backend
1. Add custom datatypes and write faster resolvers using Data Loaders
1. Add JWT based authentication & role based access control
1. Give some pointers for your further studies

## Prerequisities

Expand Down Expand Up @@ -39,3 +40,4 @@ If you are using VS.code (recommended), you will also benefit from the following
- [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome)
- [GraphQL](https://marketplace.visualstudio.com/items?itemName=Prisma.vscode-graphql)

When you are ready, let's move to the [Chapter 1: Simple GraphQL Queries](docs/1_Simple_GraphQL_Queries.md)!
11 changes: 8 additions & 3 deletions docs/1_Simple_GraphQL_Queries.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Writing GraphQL Queries
# Simple GraphQL Queries

This sections introduces you to querying GraphQL APIs through a few popular APIs.
This chapter introduces you to querying GraphQL APIs through a few popular APIs.

## Basic Queries

Expand Down Expand Up @@ -52,4 +52,9 @@ query {
## References

* [GitHub API docs](https://docs.github.com/en/free-pro-team@latest/graphql/guides/using-the-explorer)
* [GitHub token settings](https://github.com/settings/tokens)
* [GitHub token settings](https://github.com/settings/tokens)

## Navigation

* [Index](../README.md)
* [Next Chapter](2_Bootstrap.md)
16 changes: 14 additions & 2 deletions docs/2_Bootstrap.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Bootstrap your stack
# Bootstrap Your Stack

This chapter bootstraps a simple Node.js/TypeScript/Apollo server stack.

### Initialise the Backend and Tooling Dependencies

Expand Down Expand Up @@ -60,4 +62,14 @@ jq '.main = "build/index.js"' package.json | sponge package.json
jq -r '.scripts.start = "node ."' package.json | sponge package.json
jq -r '.scripts.watch = "nodemon --watch build --watch schema.graphql"' package.json | sponge package.json
jq -r '.scripts.build = "tsc -b --incremental"' package.json | sponge package.json
jq -r '.scripts.build_watch = "tsc -b --watch"' package.json | sponge package.json
jq -r '.scripts.build_watch = "tsc -b --watch"' package.json | sponge package.json
```

## References

* [eslint-config-standard-with-typescript](https://github.com/standard/eslint-config-standard-with-typescript)

## Navigation

* [Previous Chapter](1_Simple_GraphQL_Queries.md)
* [Next Chapter](3_Simple_Backend.md)
13 changes: 8 additions & 5 deletions docs/3_Simple_Backend.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Bootstrap a Node.js/TypeScript/Apollo Server stack
# A Simple Backend

This section helps to bootstrap a a basic Apollo Server stack that uses
This chapter helps to bootstrap a a basic Apollo Server stack that uses
TypeScript. You will likely want to fine tune it for your preferences later.

### Create a Minimal Server and Schema
Expand Down Expand Up @@ -66,6 +66,9 @@ open http://localhost:4000

## References

* [Get started with Apollo Server](https://www.apollographql.com/docs/apollo-server/getting-started/)
* [eslint-config-standard-with-typescript](https://github.com/standard/eslint-config-standard-with-typescript)
* [@sindresorhus/tsconfig](https://www.npmjs.com/package/@sindresorhus/tsconfig)
* [Get started with Apollo Server](https://www.apollographql.com/apollo-server/getting-started/)

## Navigation

* [Previous Chapter](2_Bootstrap.md)
* [Next Chapter](4_Refined_Backend.md)
9 changes: 7 additions & 2 deletions docs/4_Refined_Backend.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Writing Resolvers
# Writing a Refined Backend

This section refines the basic bootstrap to a full API:
This chapter refines the basic bootstrap to a full API:
1. Create the Data Models using [sequelize-typescript](https://www.npmjs.com/package/sequelize-typescript)
1. Create TypeScript typings from schma using [GraphQL Code Generator](https://graphql-code-generator.com/)
1. Bind them together using [GraphQL Modules](https://graphql-modules.com/)
Expand Down Expand Up @@ -282,3 +282,8 @@ Add sample data to the database, and watch the first resolvers to be loaded!
- [GraphQL Code Generator](https://graphql-code-generator.com/)
- [GraphQL Modules](https://graphql-modules.com/)
- [TypeGraphQL - define GraphQL types with annotations](https://typegraphql.ml/)

## Navigation

* [Previous Chapter](3_Simple_Backend.md)
* [Next Chapter](5_Bootstrap_Frontend.md)
17 changes: 13 additions & 4 deletions docs/5_Bootstrap_Frontend.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Bootstrap a React / Apollo Client App
# Bootstrap the Frontend and Dive Deeper into Queries

## Building a GraphQL Client
This chapter bootstraps a simple React/Apollo Client app that connects your backend.

## Querying for data
## Add Apollo Client

## Mutating data
## Generate Simple Queries With GraphQL CodeGen

## Querying for Data

## Mutating Data

## Using Fragments (for recurring fetch patterns)

## Navigation

* [Previous Chapter](4_Refined_Backend.md)
* [Next Chapter](6_Custom_DataTypes_Data_Loaders.md)
14 changes: 9 additions & 5 deletions docs/6_Custom_DataTypes_Data_Loaders.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Bootstrap a React / Apollo Client App
# Custom DataTypes, Data Loaders and Oh My!

## Building a GraphQL Client
This chapter refines your GraphQL knowledge to custom data types, Data Loaders and other topics
that are beyond basics but that everybody needs.
### Nested resolvers

## Querying for data
### Custom Types (JSON, UUID etc.)

## Mutating data
### Data Loaders (Solving the N+1 Problem & Caching)
## Navigation

## Using Fragments (for recurring fetch patterns)
* [Previous Chapter](5_Bootstrap_Frontend.md)
* [Next Chapter](7_Authentication_and_Access_Control.md)
12 changes: 10 additions & 2 deletions docs/7_Authentication_and_Access_Control.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Supplementary Topics
# Authentication and Access Control

Most APIs need access control, and this chapter shows an implementation of one of the most common
solutions, e.g. JWT based authentication and role based access control.

## Authentication and Access Control Using JWTs

### Adding JWT

### Role Based Access Control Using GraphQL Directives

### Adding authentication to the Frontend
### Adding Authentication to the Frontend

## Navigation

* [Previous Chapter](6_Custom_DataTypes_Data_Loaders.md)
* [Next Chapter](8_Beyond_Basics.md)
12 changes: 12 additions & 0 deletions docs/8_Beyond_Basics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Beyond Basics

This chapter gives pointers for your further studies.

## GraphQL Specification

## Subscriptions

## API Federation

* [Previous Chapter](7_Authentication_and_Access_Control.md)
* [Index](../README.md)

0 comments on commit 8b98821

Please sign in to comment.