GithubHelp home page GithubHelp logo

code-hex / gqldoc Goto Github PK

View Code? Open in Web Editor NEW
193.0 3.0 7.0 123.7 MB

The easiest way to make API documents for GraphQL

License: MIT License

Go 99.78% Makefile 0.22%
graphql documentation go golang graphql-schema graphql-endpoint

gqldoc's Introduction

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

How to use

Generate docs from graphql endpoint

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_dir

Generate docs from graphql schema files

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

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

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

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

You can also use glob.

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

Installation

Mac and Linux users via Homebrew

$ 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.

$ 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
  • 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.

gqldoc's People

Contributors

code-hex avatar github-actions[bot] avatar skanehira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.