This commit is contained in:
sunli 2020-04-15 11:15:30 +08:00
parent ead4cbb1c6
commit 643f1d4906
67 changed files with 191 additions and 2 deletions

55
.github/workflows/book.yml vendored Normal file
View File

@ -0,0 +1,55 @@
name: Book
on:
pull_request:
branches:
- master
paths:
- 'docs/**'
push:
branches:
- master
paths:
- 'docs/**'
jobs:
deploy_en:
name: Deploy book on gh-pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install mdBook
uses: peaceiris/actions-mdbook@v1
- name: Render book
run: |
mdbook build -d gh-pages docs/en
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.5.1
with:
emptyCommits: false
keepFiles: true
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages-en
PUBLISH_DIR: docs/book/gh-pages
deploy_zh_CN:
name: Deploy book on gh-pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install mdBook
uses: peaceiris/actions-mdbook@v1
- name: Render book
run: |
mdbook build -d gh-pages-zh-CN docs/zh-CN
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.5.1
with:
emptyCommits: false
keepFiles: true
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages-zh-CN
PUBLISH_DIR: docs/book/gh-pages

View File

@ -4,7 +4,9 @@ on:
push:
branches:
- master
pull_request: {}
pull_request:
branches:
- master
jobs:
build:
@ -20,6 +22,7 @@ jobs:
- name: Run tests
run: cargo test --all --verbose
cover:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

2
.gitignore vendored
View File

@ -2,4 +2,4 @@
Cargo.lock
.idea
.DS_Store
node_modules
node_modules

1
docs/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
book

6
docs/en/book.toml Normal file
View File

@ -0,0 +1,6 @@
[book]
authors = ["sunli"]
description = "Async-graphql Book"
src = "src"
language = "zh-CN"
title = "Async-graphql Book"

31
docs/en/src/SUMMARY.md Normal file
View File

@ -0,0 +1,31 @@
# Async-graphql Book
- [Introduction](introduction.md)
- [Quickstart](quickstart.md)
- [Type System](typesystem.md)
- [SimpleObject](define_simple_object)
- [Object](define_complex_object)
- [Context](context)
- [Error handling](error_handling)
- [Enum](define_enum)
- [Interface](define_interface)
- [Union](define_union)
- [InputObject](define_input_object)
- [Schema](define_schema)
- [Query and Mutation](query_and_mutation)
- [Subscription](subscription)
- [Utilities](utilities)
- [Input value validators](input_value_validators)
- [Cache control](cache_control)
- [Cursor connections](cursor_connections)
- [Error extensions](error_extensions)
- [Apollo Tracing](apollo_tracing)
- [Integrations](integrations)
- [Warp](integrations_to_warp)
- [Actix-web](integrations_to_actix_web)
- [Advanced topics](advanced_topics)
- [Custom scalars](custom_scalars)
- [Custom input value validators](custom_input_value_validators)
- [Custom extensions](custom_extensions)
- [Custom subscription transport](custom_subscription_transport)
- [Apollo Federation](apollo_federation)

View File

@ -0,0 +1 @@
# Advanced topics

View File

@ -0,0 +1 @@
# Apollo Federation

View File

@ -0,0 +1 @@
# Apollo Tracing

View File

@ -0,0 +1 @@
# Cache control

1
docs/en/src/context Normal file
View File

@ -0,0 +1 @@
# Context

View File

@ -0,0 +1 @@
# Cursor

View File

@ -0,0 +1 @@
# Custom extensions

View File

@ -0,0 +1 @@
# Custom input value validators

View File

@ -0,0 +1 @@
# Custom scalars

View File

@ -0,0 +1 @@
# Custom subscription transport

View File

@ -0,0 +1 @@
# Object

1
docs/en/src/define_enum Normal file
View File

@ -0,0 +1 @@
# Enum

View File

@ -0,0 +1 @@
# InputObject

View File

@ -0,0 +1 @@
# Interface

View File

@ -0,0 +1 @@
# Schema

View File

@ -0,0 +1 @@
# SimpleObject

1
docs/en/src/define_union Normal file
View File

@ -0,0 +1 @@
# Union

View File

@ -0,0 +1 @@
# Error extensions

View File

@ -0,0 +1 @@
# Error handling

View File

@ -0,0 +1 @@
# Input value validators

1
docs/en/src/integrations Normal file
View File

@ -0,0 +1 @@
# Integrations

View File

@ -0,0 +1 @@
# Actix-web

View File

@ -0,0 +1 @@
# Warp

View File

@ -0,0 +1 @@
# Introduction

View File

@ -0,0 +1 @@
# Query and Mutation

View File

@ -0,0 +1 @@
# Quickstart

1
docs/en/src/subscription Normal file
View File

@ -0,0 +1 @@
# Subscription

View File

@ -0,0 +1 @@
# Type System

1
docs/en/src/utilities Normal file
View File

@ -0,0 +1 @@
# Utilities

6
docs/zh-CN/book.toml Normal file
View File

@ -0,0 +1,6 @@
[book]
authors = ["sunli"]
description = "Async-graphql使用手册"
src = "src"
language = "zh-CN"
title = "Async-graphql教程"

30
docs/zh-CN/src/SUMMARY.md Normal file
View File

@ -0,0 +1,30 @@
# Async-graphql教程
- [介绍](introduction.md)
- [快速开始](quickstart.md)
- [类型系统](typesystem.md)
- [简单对象(SimpleObject)](define_simple_object)
- [对象(Object)](define_complex_object)
- [查询上下文(Context)](context)
- [错误处理](error_handling)
- [枚举(Enum)](define_enum)
- [接口(Interface)](define_interface)
- [联合(Union)](define_union)
- [输入对象(InputObject)](define_input_object)
- [定义模式(Schema)](define_schema)
- [查询和变更](query_and_mutation)
- [订阅](subscription)
- [实用功能](utilities)
- [输入值校验器](input_value_validators)
- [查询缓存控制](cache_control)
- [游标连接(Cursor Connections)](cursor_connections)
- [Apollo Tracing支持](apollo_tracing)
- [集成到WebServer](integrations)
- [Warp](integrations_to_warp)
- [Actix-web](integrations_to_actix_web)
- [高级主题](advanced_topics)
- [自定义标量](custom_scalars)
- [自定义输入值校验器](custom_input_value_validators)
- [自定义扩展](custom_extensions)
- [自定义订阅传输协议](custom_subscription_transport)
- [Apollo Federation集成](apollo_federation)

View File

@ -0,0 +1 @@
# 高级主题

View File

@ -0,0 +1 @@
# Apollo Federation集成

View File

@ -0,0 +1 @@
# Apollo Tracing支持

View File

@ -0,0 +1 @@
# 查询缓存控制

1
docs/zh-CN/src/context Normal file
View File

@ -0,0 +1 @@
# 查询上下文(Context)

View File

@ -0,0 +1 @@
# 游标连接(Cursor Connections)

View File

@ -0,0 +1 @@
# 自定义扩展

View File

@ -0,0 +1 @@
# 自定义输入值校验器

View File

@ -0,0 +1 @@
# 自定义标量

View File

@ -0,0 +1 @@
# 自定义订阅传输协议

View File

@ -0,0 +1 @@
# 对象

View File

@ -0,0 +1 @@
# 枚举(Enum)

View File

@ -0,0 +1 @@
# 输入对象(InputObject)

View File

@ -0,0 +1 @@
# 接口(Interface)

View File

@ -0,0 +1 @@
# 对象

View File

@ -0,0 +1 @@
# 定义模式(Schema)

View File

@ -0,0 +1 @@
# 简单对象

View File

@ -0,0 +1 @@
# 联合(Union)

View File

@ -0,0 +1 @@
# 错误扩展

View File

@ -0,0 +1 @@
# 错误处理

View File

@ -0,0 +1 @@
# 输入值校验器

View File

@ -0,0 +1 @@
# 集成到WebServer

View File

@ -0,0 +1 @@
# Actix-web

View File

@ -0,0 +1 @@
# Warp

View File

@ -0,0 +1 @@
# 介绍

View File

@ -0,0 +1 @@
# 查询和变更

View File

View File

@ -0,0 +1 @@
# 订阅

View File

1
docs/zh-CN/src/utilities Normal file
View File

@ -0,0 +1 @@
# 实用功能