@magidoc/rollup-plugin-gql-schema
Advanced tools
Comparing version 3.0.5 to 3.0.6
@@ -1,4 +0,11 @@ | ||
import { isSpecifiedScalarType, print, isSpecifiedDirective } from 'graphql'; | ||
import { printSchema, isSpecifiedScalarType, print, isSpecifiedDirective } from 'graphql'; | ||
function printSchemaWithDirectives(schema) { | ||
const sdlWithDirectives = printAstNodesWithDirectives(schema); | ||
// Means that there are no AST nodes present | ||
if (sdlWithDirectives.trim().length === 0) | ||
return printSchema(schema); | ||
return sdlWithDirectives; | ||
} | ||
function printAstNodesWithDirectives(schema) { | ||
const str = Object.values(schema.getTypeMap()) | ||
@@ -5,0 +12,0 @@ .filter((k) => !k.name.match(/^__/)) |
@@ -5,3 +5,3 @@ { | ||
"private": false, | ||
"version": "3.0.5", | ||
"version": "3.0.6", | ||
"type": "module", | ||
@@ -8,0 +8,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
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
18012
239