Sign inSign up

bureauxapartager/graphql-markdown

By bureauxapartager

•Updated almost 8 years ago

GraphQL schema to markdown

Image
0

358

bureauxapartager/graphql-markdown repository overview

Docker image for https://github.com/exogen/graphql-markdown⁠

Write markdown/frontmatter, generate GraphQL TypesDefs & Resolvers, query via GraphQL, and serve as html.

Usage :

docker run --rm  bureauxapartager/graphql-markdown:latest sh -c "node src/index.js [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)
    - an importable module with the schema as its default export (either an instance
      of GraphQLSchema or a JSON object)

  Options:

    --title <string>          Change the top heading title (default: 'Schema Types')
    --no-title                Do not print a default title
    --prologue <string>       Include custom Markdown after the title
    --epilogue <string>       Include custom Markdown after everything else
    --heading-level <num>     Heading level to begin at, useful if you are embedding the
                              output in a document with other sections (default: 1)
    --update-file <file>      Markdown document to update (between comment markers) or
                              create (if the file does not exist)
    --require <module>        If importing the schema from a module, require the specified
                              module first (useful for e.g. babel-register)
    --extra-headers <headers> json containing additional http headers to pass to the GraphQL
                              endpoint. Example : '{"apiKey":"12345"}'
    --version                 Print version and exit

Tag summary

Content type

Image

Digest

Size

79.1 MB

Last updated

almost 8 years ago

docker pull bureauxapartager/graphql-markdown