为 GraphQL 创建 API 文档的最简单方法
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.
You need to enable GraphQL Introspection. --header and --query options are supported.
$ gqldoc -e http://127.0.0.1:8081/query --header 'Authorization: Bearer token' -o ./doc_dirSupported .json and .graphql, .gql extensions. .json must be contained the result of introspection.
$ gqldoc -s schema.graphql -o ./doc_dirIf you want to specify multiple schema, you can use --schema flag repeatedly.
$ gqldoc -s a.graphql -s b.graphql -o ./doc_dirYou can also use glob.
$ gqldoc -s "schema/**/*.graphql" -o ./doc_dir$ brew install Code-Hex/tap/gqldocAgain, this tool is supported Go 1.16 and above. If you are one of those users, you can install like below.
$ go install github.com/Code-Hex/gqldoc/cmd/gqldoc@latestYou can download binary from here
This todo list is written the order of priority.
暂无开放 Issues,或尚未同步最近议题。