graphql-markdown

The easiest way to document your GraphQL schema.

MIT License

Downloads
106.4K
Stars
175
Committers
10
graphql-markdown - Latest Release

Published by exogen about 2 years ago

Breaking Change

  • The minimum supported Node.js version has been bumped to 14.0.0.
  • All dependencies have been bumped where possible; these may come with their own new system requirements (e.g. minimum Node.js version).

Internal

  • Adopt standard Prettier config rather than less popular "Standard" config.
graphql-markdown -

Published by exogen about 2 years ago

  • Add support for GraphQL v16. (#87, thanks @nextdude!)
graphql-markdown -

Published by exogen over 3 years ago

Breaking Change

  • The introspection query is now obtained via .getIntrospectionQuery() rather than .introspectionQuery, which means versions of graphql prior to its introduction in v0.12 are no longer supported.
  • The graphql package was moved from dependencies to peerDependencies, so it will no longer be automatically installed with this package. This should mean that there won't potentially be multiple versions of graphql installed in node_modules and this package should just inherit whichever you already use (even though it should have already anyway due to it being resolved with resolve-from).

New Feature

  • Support for graphql v15, which removed the deprecated .introspectionQuery API in favor of .getIntrospectionQuery(). (#65, @aisapatino)
  • Support for rendering UNION types. (#53, @nextdude)
graphql-markdown -

Published by exogen almost 5 years ago

New Feature

  • Added --no-toc CLI option and skipTableOfContents Node API for skipping the Table of Contents rendering. #48, thanks @p-janik!
graphql-markdown -

Published by exogen almost 5 years ago

New Feature

  • The new --header CLI param allows you to add arbitrary HTTP headers to the request when fetching a remote GraphQL schema (#40). Thanks to @johannespfeiffer and @ruben-podadera for the original idea.
graphql-markdown -

Published by exogen about 6 years ago

Fixed

  • Remove accidental trailing space after Query and Mutation section heading names.
  • Improved GraphQLSchema instance detection.
graphql-markdown -

Published by exogen about 6 years ago

Changed

  • Bumped all dependencies, including GraphQL. Note that this library still tries to use the schema's local version of GraphQL if you point it at a module.
  • Dropped support for Node versions below 8.10.0.
  • Improved test suite.

Added

  • Support for Input Types. Thanks @thomasmichaelwallace! (#34)
  • Modules can now export a Promise that resolves to a schema.
graphql-markdown -

Published by exogen about 6 years ago

Added

  • Mutation support! Thanks @adamisntdead! (#27)
graphql-markdown -

Published by exogen about 6 years ago

Changed

  • Node 8.10 is now the minimum supported version of Node.
  • All dependencies have been upgraded, including GraphQL.
graphql-markdown -

Published by exogen almost 7 years ago

Added

  • New renderSchema option, headingLevel(CLI: --heading-level), which specifies the initial level of Markdown headings in the generated output.
  • New renderSchema option, skipTitle (CLI: --no-title), to skip printing a document title.
  • New function, updateSchema, which updates an existing Markdown document in-place. It looks for <!-- START graphql-markdown --> and <!-- END graphql-markdown --> comment markers and injects the rendered schema between them, so you can print the schema to just one section of the document.
  • New CLI option, --update-file, which will trigger updateSchema instead of renderSchema.

Changed

  • Bumped dependencies.
graphql-markdown -

Published by exogen about 7 years ago

graphql-markdown -

Published by exogen about 7 years ago

Changed

  • When a schema document passed to renderSchema() does not have a query type, objects, enums, scalars, or interfaces, the respective section is excluded from the output (instead of printing an empty section).

Added

  • A new diffSchema() function for obtaining only the added and updated types and fields between two schemas.
  • The programmatic Node API is now documented in the README.
  • A new renderSchema option unknownTypeURL was added. If a type name is being rendered and the type isn't in this schema for whatever reason (maybe it's rendering the result of diffSchema()), this is a fallback option to potentially point to another document containing the type.
graphql-markdown -

Published by exogen about 7 years ago

This release is available under the next dist-tag:

  • yarn add graphql-markdown@next -D
  • npm install graphql-markdown@next -D

Changed

  • When a schema document passed to renderSchema() does not have a query type, objects, enums, scalars, or interfaces, the respective section is excluded from the output (instead of printing an empty section).

Added

  • A new diffSchema() function for obtaining only the added and updated types and fields between two schemas.
  • The programmatic Node API is now documented in the README.
graphql-markdown -

Published by exogen about 7 years ago

Added

  • A test on the output generated for the GraphBrainz schema.
  • Prettier for pre-Standard formatting.

Changed

  • Bumped dependencies.
graphql-markdown -

Published by exogen over 7 years ago

  • Fix accidental dependency on pre-commit – sorry for potentially messing with your repo 😱
graphql-markdown -

Published by exogen over 7 years ago

Changed

  • With GitHub's update to GitHub Flavored Markdown, it is no longer necessary to pre-render Markdown content in table cells, as long as there are blank lines surrounding the content.

    While not as pretty due to the descriptions being wrapped in <p> tags (adding bottom padding to even single-line table cells), this significantly simplifies the approach and the output. (#4)

graphql-markdown

graphql-markdown -

Published by exogen over 7 years ago

This release makes a few improvements to both the literal and rendered output. (#2)

  • GitHub seems to have updated their <p> styling to be less disruptive within a table cell. Previously, paragraphs would have too much margin/padding around them, misaligning them with non-paragraph content in adjacent cells. Now, paragraph content aligns with non-paragraph content.
    • To fix this, previously graphql-markdown removed all <p> tags and ensured multiple paragraphs were separated with <br> elements.
    • Now, graphql-markdown still removes <p> tags if the entire string is a single paragraph (to minimize their unnecessary presence in the output). However, if there are multiple paragraphs, or elements before/after the only paragraph, they will be maintained. This improves the rendering of cases such as lists (and various other non-paragraph elements) following paragraphs (previously, there was not enough whitespace between them).
  • The marked renderer is now called with { gfm: true }.
  • The literal output of the rendered schema Markdown is now reformatted to wrap after 80 characters instead of maintaining the original source's line wrapping. This looks better because the original content was written in the context of its surrounding code and indentation level, so maintaining the original wrapping just looked wrong. This has no affect on the rendered output, just the literal output.
graphql-markdown -

Published by exogen over 7 years ago

  • Remove Node 6 requirement from README.
graphql-markdown -

Published by exogen over 7 years ago

  • Support Node 4 by using less modern syntax.
graphql-markdown -

Published by exogen over 7 years ago

  • Require Node 6 or greater via the engines field.
Package Rankings
Top 2.62% on Npmjs.org
Badges
Extracted from project README
npm version
Related Projects