Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphql-markdown

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-markdown

Generate documentation for your GraphQL schema in Markdown

  • 1.0.1
  • npm
  • Socket score

Version published
Weekly downloads
12K
decreased by-2.39%
Maintainers
1
Weekly downloads
 
Created
Source

graphql-markdown

Generate Markdown docs for a GraphQL schema.

npm install graphql-markdown --save-dev

See an example generated from the graphbrainz schema.

Usage

Installing the package adds a graphql-markdown script. Point it at a schema and the output will be written to stdout.

$ graphql-markdown http://your-server.com/graphql > schema.md
$ graphql-markdown ./path/to/schema.graphql > schema.md
$ graphql-markdown ./path/to/schema.json > schema.md
$ graphql-markdown --help

  Usage: graphql-markdown [options] <schema>

  Output a Markdown document with rendered descriptions and links between types.
  The schema may be specified as:

    - a URL to the GraphQL endpoint (the introspection query will be run)
    - a GraphQL document containing the schema (.graphql or .gql)
    - a JSON document containing the schema (as returned by the introspection query)

  Options:

    --title <string>       Change the document title (default: 'Schema Types')
    --prologue <string>    Include custom Markdown at the beginning of the document
    --epilogue <string>    Include custom Markdown at the end of the document

Output

Output is optimized for display on GitHub, using GitHub's Markdown renderer.

Due to the complexity of the tables in the generated document, much of the output is HTML (as allowed by Markdown). Some of your GraphQL descriptions may be printed as-is (for GitHub to render) while others are pre-rendered by graphql-markdown (if they need to be included in certain HTML tags – GitHub will not render such content as Markdown).

FAQs

Package last updated on 18 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc