Add docs
This commit is contained in:
parent
ead4cbb1c6
commit
643f1d4906
55
.github/workflows/book.yml
vendored
Normal file
55
.github/workflows/book.yml
vendored
Normal 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
|
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
|
@ -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
2
.gitignore
vendored
|
@ -2,4 +2,4 @@
|
|||
Cargo.lock
|
||||
.idea
|
||||
.DS_Store
|
||||
node_modules
|
||||
node_modules
|
||||
|
|
1
docs/.gitignore
vendored
Normal file
1
docs/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
book
|
6
docs/en/book.toml
Normal file
6
docs/en/book.toml
Normal 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
31
docs/en/src/SUMMARY.md
Normal 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)
|
1
docs/en/src/advanced_topics
Normal file
1
docs/en/src/advanced_topics
Normal file
|
@ -0,0 +1 @@
|
|||
# Advanced topics
|
1
docs/en/src/apollo_federation
Normal file
1
docs/en/src/apollo_federation
Normal file
|
@ -0,0 +1 @@
|
|||
# Apollo Federation
|
1
docs/en/src/apollo_tracing
Normal file
1
docs/en/src/apollo_tracing
Normal file
|
@ -0,0 +1 @@
|
|||
# Apollo Tracing
|
1
docs/en/src/cache_control
Normal file
1
docs/en/src/cache_control
Normal file
|
@ -0,0 +1 @@
|
|||
# Cache control
|
1
docs/en/src/context
Normal file
1
docs/en/src/context
Normal file
|
@ -0,0 +1 @@
|
|||
# Context
|
1
docs/en/src/cursor_connections
Normal file
1
docs/en/src/cursor_connections
Normal file
|
@ -0,0 +1 @@
|
|||
# Cursor
|
1
docs/en/src/custom_extensions
Normal file
1
docs/en/src/custom_extensions
Normal file
|
@ -0,0 +1 @@
|
|||
# Custom extensions
|
1
docs/en/src/custom_input_value_validators
Normal file
1
docs/en/src/custom_input_value_validators
Normal file
|
@ -0,0 +1 @@
|
|||
# Custom input value validators
|
1
docs/en/src/custom_scalars
Normal file
1
docs/en/src/custom_scalars
Normal file
|
@ -0,0 +1 @@
|
|||
# Custom scalars
|
1
docs/en/src/custom_subscription_transport
Normal file
1
docs/en/src/custom_subscription_transport
Normal file
|
@ -0,0 +1 @@
|
|||
# Custom subscription transport
|
1
docs/en/src/define_complex_object
Normal file
1
docs/en/src/define_complex_object
Normal file
|
@ -0,0 +1 @@
|
|||
# Object
|
1
docs/en/src/define_enum
Normal file
1
docs/en/src/define_enum
Normal file
|
@ -0,0 +1 @@
|
|||
# Enum
|
1
docs/en/src/define_input_object
Normal file
1
docs/en/src/define_input_object
Normal file
|
@ -0,0 +1 @@
|
|||
# InputObject
|
1
docs/en/src/define_interface
Normal file
1
docs/en/src/define_interface
Normal file
|
@ -0,0 +1 @@
|
|||
# Interface
|
1
docs/en/src/define_schema
Normal file
1
docs/en/src/define_schema
Normal file
|
@ -0,0 +1 @@
|
|||
# Schema
|
1
docs/en/src/define_simple_object
Normal file
1
docs/en/src/define_simple_object
Normal file
|
@ -0,0 +1 @@
|
|||
# SimpleObject
|
1
docs/en/src/define_union
Normal file
1
docs/en/src/define_union
Normal file
|
@ -0,0 +1 @@
|
|||
# Union
|
1
docs/en/src/error_extensions
Normal file
1
docs/en/src/error_extensions
Normal file
|
@ -0,0 +1 @@
|
|||
# Error extensions
|
1
docs/en/src/error_handling
Normal file
1
docs/en/src/error_handling
Normal file
|
@ -0,0 +1 @@
|
|||
# Error handling
|
1
docs/en/src/input_value_validators
Normal file
1
docs/en/src/input_value_validators
Normal file
|
@ -0,0 +1 @@
|
|||
# Input value validators
|
1
docs/en/src/integrations
Normal file
1
docs/en/src/integrations
Normal file
|
@ -0,0 +1 @@
|
|||
# Integrations
|
1
docs/en/src/integrations_to_actix_web
Normal file
1
docs/en/src/integrations_to_actix_web
Normal file
|
@ -0,0 +1 @@
|
|||
# Actix-web
|
1
docs/en/src/integrations_to_warp
Normal file
1
docs/en/src/integrations_to_warp
Normal file
|
@ -0,0 +1 @@
|
|||
# Warp
|
1
docs/en/src/introduction.md
Normal file
1
docs/en/src/introduction.md
Normal file
|
@ -0,0 +1 @@
|
|||
# Introduction
|
1
docs/en/src/query_and_mutation
Normal file
1
docs/en/src/query_and_mutation
Normal file
|
@ -0,0 +1 @@
|
|||
# Query and Mutation
|
1
docs/en/src/quickstart.md
Normal file
1
docs/en/src/quickstart.md
Normal file
|
@ -0,0 +1 @@
|
|||
# Quickstart
|
1
docs/en/src/subscription
Normal file
1
docs/en/src/subscription
Normal file
|
@ -0,0 +1 @@
|
|||
# Subscription
|
1
docs/en/src/typesystem.md
Normal file
1
docs/en/src/typesystem.md
Normal file
|
@ -0,0 +1 @@
|
|||
# Type System
|
1
docs/en/src/utilities
Normal file
1
docs/en/src/utilities
Normal file
|
@ -0,0 +1 @@
|
|||
# Utilities
|
6
docs/zh-CN/book.toml
Normal file
6
docs/zh-CN/book.toml
Normal 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
30
docs/zh-CN/src/SUMMARY.md
Normal 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)
|
1
docs/zh-CN/src/advanced_topics
Normal file
1
docs/zh-CN/src/advanced_topics
Normal file
|
@ -0,0 +1 @@
|
|||
# 高级主题
|
1
docs/zh-CN/src/apollo_federation
Normal file
1
docs/zh-CN/src/apollo_federation
Normal file
|
@ -0,0 +1 @@
|
|||
# Apollo Federation集成
|
1
docs/zh-CN/src/apollo_tracing
Normal file
1
docs/zh-CN/src/apollo_tracing
Normal file
|
@ -0,0 +1 @@
|
|||
# Apollo Tracing支持
|
1
docs/zh-CN/src/cache_control
Normal file
1
docs/zh-CN/src/cache_control
Normal file
|
@ -0,0 +1 @@
|
|||
# 查询缓存控制
|
1
docs/zh-CN/src/context
Normal file
1
docs/zh-CN/src/context
Normal file
|
@ -0,0 +1 @@
|
|||
# 查询上下文(Context)
|
1
docs/zh-CN/src/cursor_connections
Normal file
1
docs/zh-CN/src/cursor_connections
Normal file
|
@ -0,0 +1 @@
|
|||
# 游标连接(Cursor Connections)
|
1
docs/zh-CN/src/custom_extensions
Normal file
1
docs/zh-CN/src/custom_extensions
Normal file
|
@ -0,0 +1 @@
|
|||
# 自定义扩展
|
1
docs/zh-CN/src/custom_input_value_validators
Normal file
1
docs/zh-CN/src/custom_input_value_validators
Normal file
|
@ -0,0 +1 @@
|
|||
# 自定义输入值校验器
|
1
docs/zh-CN/src/custom_scalars
Normal file
1
docs/zh-CN/src/custom_scalars
Normal file
|
@ -0,0 +1 @@
|
|||
# 自定义标量
|
1
docs/zh-CN/src/custom_subscription_transport
Normal file
1
docs/zh-CN/src/custom_subscription_transport
Normal file
|
@ -0,0 +1 @@
|
|||
# 自定义订阅传输协议
|
1
docs/zh-CN/src/define_complex_object
Normal file
1
docs/zh-CN/src/define_complex_object
Normal file
|
@ -0,0 +1 @@
|
|||
# 对象
|
1
docs/zh-CN/src/define_enum
Normal file
1
docs/zh-CN/src/define_enum
Normal file
|
@ -0,0 +1 @@
|
|||
# 枚举(Enum)
|
1
docs/zh-CN/src/define_input_object
Normal file
1
docs/zh-CN/src/define_input_object
Normal file
|
@ -0,0 +1 @@
|
|||
# 输入对象(InputObject)
|
1
docs/zh-CN/src/define_interface
Normal file
1
docs/zh-CN/src/define_interface
Normal file
|
@ -0,0 +1 @@
|
|||
# 接口(Interface)
|
1
docs/zh-CN/src/define_object
Normal file
1
docs/zh-CN/src/define_object
Normal file
|
@ -0,0 +1 @@
|
|||
# 对象
|
1
docs/zh-CN/src/define_schema
Normal file
1
docs/zh-CN/src/define_schema
Normal file
|
@ -0,0 +1 @@
|
|||
# 定义模式(Schema)
|
1
docs/zh-CN/src/define_simple_object
Normal file
1
docs/zh-CN/src/define_simple_object
Normal file
|
@ -0,0 +1 @@
|
|||
# 简单对象
|
1
docs/zh-CN/src/define_union
Normal file
1
docs/zh-CN/src/define_union
Normal file
|
@ -0,0 +1 @@
|
|||
# 联合(Union)
|
1
docs/zh-CN/src/error_extensions
Normal file
1
docs/zh-CN/src/error_extensions
Normal file
|
@ -0,0 +1 @@
|
|||
# 错误扩展
|
1
docs/zh-CN/src/error_handling
Normal file
1
docs/zh-CN/src/error_handling
Normal file
|
@ -0,0 +1 @@
|
|||
# 错误处理
|
1
docs/zh-CN/src/input_value_validators
Normal file
1
docs/zh-CN/src/input_value_validators
Normal file
|
@ -0,0 +1 @@
|
|||
# 输入值校验器
|
1
docs/zh-CN/src/integrations
Normal file
1
docs/zh-CN/src/integrations
Normal file
|
@ -0,0 +1 @@
|
|||
# 集成到WebServer
|
1
docs/zh-CN/src/integrations_to_actix_web
Normal file
1
docs/zh-CN/src/integrations_to_actix_web
Normal file
|
@ -0,0 +1 @@
|
|||
# Actix-web
|
1
docs/zh-CN/src/integrations_to_warp
Normal file
1
docs/zh-CN/src/integrations_to_warp
Normal file
|
@ -0,0 +1 @@
|
|||
# Warp
|
1
docs/zh-CN/src/introduction.md
Normal file
1
docs/zh-CN/src/introduction.md
Normal file
|
@ -0,0 +1 @@
|
|||
# 介绍
|
1
docs/zh-CN/src/query_and_mutation
Normal file
1
docs/zh-CN/src/query_and_mutation
Normal file
|
@ -0,0 +1 @@
|
|||
# 查询和变更
|
0
docs/zh-CN/src/quickstart.md
Normal file
0
docs/zh-CN/src/quickstart.md
Normal file
1
docs/zh-CN/src/subscription
Normal file
1
docs/zh-CN/src/subscription
Normal file
|
@ -0,0 +1 @@
|
|||
# 订阅
|
0
docs/zh-CN/src/typesystem.md
Normal file
0
docs/zh-CN/src/typesystem.md
Normal file
1
docs/zh-CN/src/utilities
Normal file
1
docs/zh-CN/src/utilities
Normal file
|
@ -0,0 +1 @@
|
|||
# 实用功能
|
Loading…
Reference in New Issue
Block a user