百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

gqldoc

> 后端框架
开源

为 GraphQL 创建 API 文档的最简单方法

190 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

为 GraphQL 创建 API 文档的最简单方法

Document Generator for GraphQL

gqldoc is now alpha

gqldoc is command line tool to generate documents from GraphQL schema or your GraphQL endpoint. the command is written by Go 1.16. So You need Go 1.16 and above If you want to build.

Demo

  • Star Wars API
  • Github V4 API
    • Public schema is here

How to use

Generate docs from graphql endpoint

You need to enable GraphQL Introspection. --header and --query options are supported.

bash
$ gqldoc -e http://127.0.0.1:8081/query --header 'Authorization: Bearer token' -o ./doc_dir

Generate docs from graphql schema files

Supported .json and .graphql, .gql extensions. .json must be contained the result of introspection.

bash
$ gqldoc -s schema.graphql -o ./doc_dir

If you want to specify multiple schema, you can use --schema flag repeatedly.

bash
$ gqldoc -s a.graphql -s b.graphql -o ./doc_dir

You can also use glob.

bash
$ gqldoc -s "schema/**/*.graphql" -o ./doc_dir

Installation

Mac and Linux users via Homebrew

bash
$ brew install Code-Hex/tap/gqldoc

Manually via go command

Again, this tool is supported Go 1.16 and above. If you are one of those users, you can install like below.

bash
$ go install github.com/Code-Hex/gqldoc/cmd/gqldoc@latest

Manually download

You can download binary from here

Todo

This todo list is written the order of priority.

  • GitHub Actions for this Available
    • Update document and push it to current branch If target schema has diff
    • https://github.com/Code-Hex/gqldoc-actions
  • Subscription
  • Directive and it's location.
  • Put README.md in output directory
    • TOC purpose
  • Custom Template
  • Render HTML
    • I'm wondering if I should really support this feature.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Godocumentationgogolanggraphql

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类后端框架
定价开源

> 相关工具

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架