@graphql-tools/webpack-loader
Advanced tools
Comparing version 6.5.0-alpha-26d1f1e3.0 to 6.5.0-alpha-33ae0978.0
@@ -0,1 +1,2 @@ | ||
import type { LoaderContext } from 'webpack'; | ||
interface Options { | ||
@@ -9,6 +10,3 @@ noDescription?: boolean; | ||
} | ||
export default function graphqlLoader(this: { | ||
query: Options; | ||
cacheable: VoidFunction; | ||
}, source: string): string; | ||
export default function graphqlLoader(this: LoaderContext<Options>, source: string): string; | ||
export {}; |
@@ -95,2 +95,3 @@ 'use strict'; | ||
this.cacheable(); | ||
// TODO: This should probably use this.getOptions() | ||
var options = this.query || {}; | ||
@@ -110,6 +111,6 @@ var doc = parseDocument(source); | ||
if (options.replaceKinds) { | ||
Object.keys(graphql.Kind).forEach(function (identifier) { | ||
for (var identifier in graphql.Kind) { | ||
var value = graphql.Kind[identifier]; | ||
stringifiedDoc = stringifiedDoc.replace(new RegExp("\"kind\":\"" + value + "\"", 'g'), "\"kind\": Kind." + identifier); | ||
}); | ||
} | ||
} | ||
@@ -143,2 +144,1 @@ var headerCode = "\n " + (options.replaceKinds ? "var Kind = require('graphql/language/kinds');" : '') + "\n var doc = " + stringifiedDoc + ";\n "; | ||
module.exports = graphqlLoader; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@graphql-tools/webpack-loader/es5", | ||
"version": "6.5.0-alpha-26d1f1e3.0", | ||
"version": "6.5.0-alpha-33ae0978.0", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
@@ -0,1 +1,2 @@ | ||
import type { LoaderContext } from 'webpack'; | ||
interface Options { | ||
@@ -9,6 +10,3 @@ noDescription?: boolean; | ||
} | ||
export default function graphqlLoader(this: { | ||
query: Options; | ||
cacheable: VoidFunction; | ||
}, source: string): string; | ||
export default function graphqlLoader(this: LoaderContext<Options>, source: string): string; | ||
export {}; |
@@ -100,2 +100,3 @@ 'use strict'; | ||
this.cacheable(); | ||
// TODO: This should probably use this.getOptions() | ||
const options = this.query || {}; | ||
@@ -115,6 +116,6 @@ let doc = parseDocument(source); | ||
if (options.replaceKinds) { | ||
Object.keys(graphql.Kind).forEach((identifier) => { | ||
for (const identifier in graphql.Kind) { | ||
const value = graphql.Kind[identifier]; | ||
stringifiedDoc = stringifiedDoc.replace(new RegExp(`"kind":"${value}"`, 'g'), `"kind": Kind.${identifier}`); | ||
}); | ||
} | ||
} | ||
@@ -153,2 +154,1 @@ const headerCode = ` | ||
module.exports = graphqlLoader; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@graphql-tools/webpack-loader", | ||
"version": "6.5.0-alpha-26d1f1e3.0", | ||
"version": "6.5.0-alpha-33ae0978.0", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
175433
0
28338
12
586