@graphql-tools/webpack-loader
Advanced tools
Comparing version 6.3.1 to 6.4.0-alpha-b0c88e22.0
@@ -107,3 +107,10 @@ 'use strict'; | ||
} | ||
var headerCode = "\n var doc = " + JSON.stringify(doc) + ";\n "; | ||
var stringifiedDoc = JSON.stringify(doc); | ||
if (options.replaceKinds) { | ||
Object.keys(graphql.Kind).forEach(function (identifier) { | ||
var value = graphql.Kind[identifier]; | ||
stringifiedDoc = stringifiedDoc.replace(new RegExp("\"kind\":\"" + value + "\"", 'g'), "\"kind\": Kind." + identifier); | ||
}); | ||
} | ||
var headerCode = "\n " + (options.replaceKinds ? "var Kind = require('graphql/language/kinds');" : '') + "\n var doc = " + stringifiedDoc + ";\n "; | ||
var outputCode = ''; | ||
@@ -110,0 +117,0 @@ // Allow multiple query/mutation definitions in a file. This parses out dependencies |
@@ -103,3 +103,10 @@ import os from 'os'; | ||
} | ||
var headerCode = "\n var doc = " + JSON.stringify(doc) + ";\n "; | ||
var stringifiedDoc = JSON.stringify(doc); | ||
if (options.replaceKinds) { | ||
Object.keys(Kind).forEach(function (identifier) { | ||
var value = Kind[identifier]; | ||
stringifiedDoc = stringifiedDoc.replace(new RegExp("\"kind\":\"" + value + "\"", 'g'), "\"kind\": Kind." + identifier); | ||
}); | ||
} | ||
var headerCode = "\n " + (options.replaceKinds ? "var Kind = require('graphql/language/kinds');" : '') + "\n var doc = " + stringifiedDoc + ";\n "; | ||
var outputCode = ''; | ||
@@ -106,0 +113,0 @@ // Allow multiple query/mutation definitions in a file. This parses out dependencies |
{ | ||
"name": "@graphql-tools/webpack-loader/es5", | ||
"version": "6.3.1", | ||
"version": "6.4.0-alpha-b0c88e22.0", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -14,3 +14,7 @@ "sideEffects": false, | ||
}, | ||
"repository": "git@github.com:ardatan/graphql-tools.git", | ||
"repository": { | ||
"type": "git", | ||
"url": "ardatan/graphql-tools", | ||
"directory": "packages/webpack-loader" | ||
}, | ||
"license": "MIT", | ||
@@ -17,0 +21,0 @@ "main": "index.cjs.js", |
@@ -112,4 +112,12 @@ 'use strict'; | ||
} | ||
let stringifiedDoc = JSON.stringify(doc); | ||
if (options.replaceKinds) { | ||
Object.keys(graphql.Kind).forEach((identifier) => { | ||
const value = graphql.Kind[identifier]; | ||
stringifiedDoc = stringifiedDoc.replace(new RegExp(`"kind":"${value}"`, 'g'), `"kind": Kind.${identifier}`); | ||
}); | ||
} | ||
const headerCode = ` | ||
var doc = ${JSON.stringify(doc)}; | ||
${options.replaceKinds ? "var Kind = require('graphql/language/kinds');" : ''} | ||
var doc = ${stringifiedDoc}; | ||
`; | ||
@@ -116,0 +124,0 @@ let outputCode = ''; |
@@ -108,4 +108,12 @@ import os from 'os'; | ||
} | ||
let stringifiedDoc = JSON.stringify(doc); | ||
if (options.replaceKinds) { | ||
Object.keys(Kind).forEach((identifier) => { | ||
const value = Kind[identifier]; | ||
stringifiedDoc = stringifiedDoc.replace(new RegExp(`"kind":"${value}"`, 'g'), `"kind": Kind.${identifier}`); | ||
}); | ||
} | ||
const headerCode = ` | ||
var doc = ${JSON.stringify(doc)}; | ||
${options.replaceKinds ? "var Kind = require('graphql/language/kinds');" : ''} | ||
var doc = ${stringifiedDoc}; | ||
`; | ||
@@ -112,0 +120,0 @@ let outputCode = ''; |
{ | ||
"name": "@graphql-tools/webpack-loader", | ||
"version": "6.3.1", | ||
"version": "6.4.0-alpha-b0c88e22.0", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -14,3 +14,7 @@ "sideEffects": false, | ||
}, | ||
"repository": "git@github.com:ardatan/graphql-tools.git", | ||
"repository": { | ||
"type": "git", | ||
"url": "ardatan/graphql-tools", | ||
"directory": "packages/webpack-loader" | ||
}, | ||
"license": "MIT", | ||
@@ -17,0 +21,0 @@ "main": "index.cjs.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
70798
566
0
2