gqldoc

package module
v0.0.0-...-0c00c67 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 17 Imported by: 0

README

gqldoc

PkgGoDev

gqldoc: Generate documentation for GraphQL Schema.

usage:
	gqldoc -format output_format files ...

output_format is one of:
	graphql	GraphQL
	gfm	GitHub Flavored Markdown

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatGraphQL

func FormatGraphQL(dst io.Writer, schema *ast.Schema) (err error)

FormatGraphQL reformats the GraphQL schema and writes it to dst, returning any error encountered when calling Write.

func FormatMarkdown

func FormatMarkdown(dst io.Writer, schema *ast.Schema) error

FormatMarkdown formats the GraphQL schema as GitHub flavored markdown and writes it to dst, returning any error encountered when calling Write.

func ParseFiles

func ParseFiles(filenames []string) (*ast.Schema, error)

ParseFiles parses GraphQL schema definitions from the named files. The returned AST holds the combined schema of all the files. There must be at least one file, and the file's extension must be either .gql or .graphql. If an error occurs, parsing stops and the returned AST is nil.

Types

type Formatter

type Formatter func(dst io.Writer, schema *ast.Schema) error

Formatter formats and writes the schema to dst, returning any error encountered.

Directories

Path Synopsis
cmd
gqldoc
gqldoc: Generate documentation for GraphQL Schema.
gqldoc: Generate documentation for GraphQL Schema.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL