GraphqlMarkdown.Page (Graphql Markdown v1.1.0)

Copy Markdown View Source

Renders the sections of a schema (queries, mutations, objects, enums, ...) as nested lists of markdown lines.

GraphqlMarkdown.SinglePage and GraphqlMarkdown.MultiPage produce the same sections and only differ in how they are laid out, which a GraphqlMarkdown.Page.Layout captures: the heading level of a section and the way a type reference becomes a link.

Summary

Types

A nested list of lines, consumed by MarkdownHelpers.document/1.

Functions

Renders one section: its heading followed by one entry per operation or type, or None when the schema has nothing in that section.

Section names, in the order they are rendered.

Types

lines()

@type lines() :: [String.t() | lines()]

A nested list of lines, consumed by MarkdownHelpers.document/1.

Functions

section(name, schema_details, layout)

Renders one section: its heading followed by one entry per operation or type, or None when the schema has nothing in that section.

sections()

@spec sections() :: [String.t()]

Section names, in the order they are rendered.