graphql-markdown
Advanced tools
Comparing version 4.0.0 to 4.1.0
{ | ||
"name": "graphql-markdown", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "Generate documentation for your GraphQL schema in Markdown", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -124,3 +124,8 @@ 'use strict' | ||
queryType && types.find(type => type.name === schema.queryType.name) | ||
const objects = types.filter(type => type.kind === 'OBJECT' && type !== query) | ||
const mutationType = schema.mutationType | ||
const mutation = | ||
mutationType && types.find(type => type.name === schema.mutationType.name) | ||
const objects = types.filter( | ||
type => type.kind === 'OBJECT' && type !== query && type !== mutation | ||
) | ||
const enums = types.filter(type => type.kind === 'ENUM') | ||
@@ -148,2 +153,5 @@ const scalars = types.filter(type => type.kind === 'SCALAR') | ||
} | ||
if (mutation) { | ||
printer(' * [Mutation](#mutation)') | ||
} | ||
if (objects.length) { | ||
@@ -184,2 +192,16 @@ printer(' * [Objects](#objects)') | ||
if (mutation) { | ||
printer( | ||
`\n${'#'.repeat(headingLevel + 1)} Mutation ${ | ||
mutation.name === 'Mutation' ? '' : '(' + mutation.name + ')' | ||
}` | ||
) | ||
renderObject(mutation, { | ||
skipTitle: true, | ||
headingLevel, | ||
printer, | ||
getTypeURL | ||
}) | ||
} | ||
if (objects.length) { | ||
@@ -186,0 +208,0 @@ printer(`\n${'#'.repeat(headingLevel + 1)} Objects`) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
197991
595