Flexible GraphQL Documentation Generator (Markdown)
MIT License
Bot releases are hidden (Show)
๐ Generated links now follow Docusaurus recommended practices to link docs files by full path. This fix adds the .mdx
extension to generated links in Markdown files.
๐ฐ A CodeSandox demo using Docusaurus versioning is available here: https://codesandbox.io/p/devbox/determined-spence-mrpnmp
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.24.3...1.24.4
Published by edno 3 months ago
๐ This release removes the use of block quotes for type description, fixing issues like #1535
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.24.2...1.24.3
Published by edno 4 months ago
๐ง Technical maintenance release for dependencies upgrades.
โ ๏ธ This version removes compatibility with the graphql
package version below 16 (see issue https://github.com/graphql-markdown/graphql-markdown/issues/1458).
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.24.1...1.24.2
Published by edno 6 months ago
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.24.0...1.24.1
Published by edno 8 months ago
๐ค A new feature printTypeOptions.exampleSection
adds supports for examples using schema directives.
The feature allows inheritance of examples, so once a scalar is set with an example all types using this scalar will share the example. And, of course, you can override those examples. You can also use a custom directive and custom parser.
More details in the documentation.
Object | Operation |
---|---|
The screenshots come from the Group by demo with the feature enabled.
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.23.0...1.24.0
Published by edno 8 months ago
โ๏ธ Executable types (operations and related directives) and system types (entity types) have now separate sections.
The behaviour can be disabled by setting the option printTypeOptions.useApiGroup
to false
or using the cli flag --noApiGroup
(see documentation).
The online examples have been updated with one using the new sections and one with the option disabled. Note that the examples have some custom CSS that is not part of the default package.
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.22.0...1.23.0
Published by edno 10 months ago
๐งโ๐ง A new setting docOptions.frontMatter
makes easier to generate pages with Docusaurus settings. Using this setting you can pass any front matter setting to the generator.
Example for the Docusaurus draft setting:
plugins: [
[
"@graphql-markdown/docusaurus",
{
schema: "./schema/swapi.graphql",
docOptions: {
frontMatter: {
draft: true, // set draft for generated pages
},
},
},
],
],
This option deprecates the options docOptions.pagination
and docOptions.toc
(more details in the documentation).
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.21.3...1.22.0
Published by edno 11 months ago
๐ Fix the incorrect build for 1.21.2 that was missing the changes for #1101.
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.21.2...1.21.3
Published by edno 11 months ago
๐ช Improve compatibility with Docusaurus 3 by using the new admonition format for the deprecated
admonition (see #1096).
Docusaurus 2 | Docusaurus 3 |
---|---|
:::caution DEPRECATED | :::warning[DEPRECATED] |
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.21.1...1.21.2
Published by edno 12 months ago
๐ Fix compatibility with Docusaurus 3, since it MDX v3 is stricter than previous version used with Docusaurus 2.
๐ก The compatibility with Docusaurus 2 is maintained, and there is no plan to drop it for now.
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.21.0...1.21.1
Published by edno about 1 year ago
This is an exceptionally big and packed release with a lot of changes, so read carefully the release notes before upgrading.
The main changes are under the hood as we migrated the codebase from Javascript to Typescript to simplify the coding experience but also to increase the code safety.
onlyDocDirective
filters the schema entities to be rendered in the documentation. This is the counterpart of skipDocDirective
, based on a request from @brampurnot in #994. See documentation.metatags
adds HTML metadata to pages using Docusaurus head metadata, based on a request from @akillkumar in #1015. See documentation.directiveDescriptor
now supports the description
placeholder, where description
is the default directive's description.@graphql-markdown/types
.@graphql-markdown/utils
into dedicated packages.Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.20.4...1.21.0
Published by edno about 1 year ago
This is a pre-release following the code base migration from JS to TS.
directiveDescriptor
now supports description
placeholder, where description
is the default directive description.@graphql-markdown/types
.helpers
, graphql
and logger
have been extracted from @graphql-markdown/utils
into their own package.Logger
has now a single method called Logger()
.API
in our docs.Published by edno about 1 year ago
๐งโ๐ป Technical release to freeze the last JS changes before the migration of the code to TS.
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.20.3...1.20.4
Published by edno about 1 year ago
๐ Fix a CSS issue for type badges in related type sections (see option printTypeOptions.relatedTypeSection
).
Before fix ๐
After fix ๐
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.20.2...1.20.3
Published by edno over 1 year ago
โจ New option printTypeOptions.codeSection
and CLI flag --noCode
for hiding the codeblock section, based on an initial request from @ris314 in https://github.com/graphql-markdown/graphql-markdown/issues/895. See documentation for more information.
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.20.1...1.20.2
Published by edno over 1 year ago
๐ฆ Update compatibility with prettier v3
when using pretty
setting. ๐ช
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.20.0...1.20.1
Published by edno over 1 year ago
โจ GraphQL Config is now supported, see the documentation for more information and limitations ๐
This is the default set up when creating a new site using the template.
First install the package graphql-config
, then you are ready to go.
npm install graphql-config
Example .graphqlrc
:
schema: "https://graphql.anilist.co/"
extensions:
graphql-markdown:
linkRoot: "/examples/default"
baseURL: "."
homepage: "data/anilist.md"
loaders:
UrlLoader:
module: "@graphql-tools/url-loader"
options:
method: "POST"
printTypeOptions:
deprecated: "group"
docOptions:
pagination: false
toc: false
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.19.0...1.20.0
Published by edno over 1 year ago
โ ๏ธ This release introduces minor breaking changes, see section breaking changes.
๐ท๏ธ Building upon customDirective
released in 1.18.0, we added a new option tag
that allows one to display custom badges (tags) in the documentation pages.
The feature is an extension of the customDirective
by using the already available directive processing. It works the same way as descriptor
, and it also comes with an helper directiveTag
... more details in the documentation.
customDirective: {
beta: {
tag: (directive) => ({
text: directive?.name.toUpperCase(),
classname: "badge--danger",
}),
},
Since tags have now a dedicated handler, the directives declared in customDirective
for descriptor
won't display a badge. A helper helper.directiveTag
is provided for backward compatibility.
Users who want to keep the previous behavior just need to declare tag: helper.directiveTag
for each directive declared.
const { helper } = require("@graphql-markdown/utils");
//---//
auth: {
descriptor: (directive, type) =>
helper.directiveDescriptor(
directive,
type,
"This requires the current user to be in `${requires}` role.",
),
tag: helper.directiveTag,
},
The deprecated "warning badge" has been changed into an admonition for a clearer UI.
Last change is the change of position of the custom directive descriptions that are now after the type description instead of before.
Published by edno over 1 year ago
โ๏ธ Add wildcard *
support for customDirective
, more details in the documentation.
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.18.1...1.18.2
Published by edno over 1 year ago
๐ Fix missing code indentation for fields in some cases (#850) by @ljiang-ti in #851.
Full Changelog: https://github.com/graphql-markdown/graphql-markdown/compare/1.18.0...1.18.1