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
Functions
The YAML front matter of a page with the given title, followed by a blank
line, or nothing when the :front_matter option is not set.
Builds a layout from the layout-specific fields and the rendering
options (:depth, :backlinks).
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.
The document title as a level-one heading.
The document title: the :title option or "Graphql Schema".
The table of contents: one list item per section that exists in the schema, with a nested item per operation or type in it.
Types
Functions
The YAML front matter of a page with the given title, followed by a blank
line, or nothing when the :front_matter option is not set.
@spec layout(GraphqlMarkdown.Schema.t(), keyword(), keyword()) :: GraphqlMarkdown.Page.Layout.t()
Builds a layout from the layout-specific fields and the rendering
options (:depth, :backlinks).
@spec section(String.t(), GraphqlMarkdown.Schema.t(), GraphqlMarkdown.Page.Layout.t()) :: lines()
Renders one section: its heading followed by one entry per operation or
type, or None when the schema has nothing in that section.
@spec sections() :: [String.t()]
Section names, in the order they are rendered.
The document title as a level-one heading.
The document title: the :title option or "Graphql Schema".
@spec toc(GraphqlMarkdown.Schema.t(), GraphqlMarkdown.Page.Layout.t()) :: lines()
The table of contents: one list item per section that exists in the schema, with a nested item per operation or type in it.
Links come from the layout's page_link.