@graphql-markdown/printer-legacy
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"license": "MIT", | ||
@@ -26,3 +26,3 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"@graphql-markdown/utils": "^1.2.1" | ||
"@graphql-markdown/utils": "^1.3.0" | ||
}, | ||
@@ -29,0 +29,0 @@ "directories": { |
@@ -7,3 +7,3 @@ const { | ||
const getGroup = (type, groups) => { | ||
const getGroup = (type, groups, typeCategory) => { | ||
if (typeof groups !== "object" || groups === null) { | ||
@@ -14,3 +14,6 @@ return ""; | ||
const typeName = graphLQLNamedType.name || graphLQLNamedType; | ||
return hasProperty(groups, typeName) ? toSlug(groups[typeName]) : ""; | ||
return hasProperty(groups, typeCategory) && | ||
hasProperty(groups[typeCategory], typeName) | ||
? toSlug(groups[typeCategory][typeName]) | ||
: ""; | ||
}; | ||
@@ -17,0 +20,0 @@ |
@@ -95,3 +95,3 @@ const { | ||
const group = hasProperty(options, "groups") | ||
? getGroup(type, options.groups) | ||
? getGroup(type, options.groups, category.plural) | ||
: ""; | ||
@@ -98,0 +98,0 @@ const url = pathUrl.join( |
33281
1007