@graphql-tools/webpack-loader
Advanced tools
Comparing version 6.0.12-alpha-7eed7f8.0 to 6.0.12-alpha-a455b31.0
@@ -36,6 +36,6 @@ 'use strict'; | ||
} | ||
function loader(path) { | ||
function loader() { | ||
this.cacheable(); | ||
const options = loaderUtils.getOptions(this); | ||
const sources = load.loadTypedefsSync(path, { | ||
const sources = load.loadTypedefsSync(this.resourcePath, { | ||
loaders: [new graphqlFileLoader.GraphQLFileLoader()], | ||
@@ -52,3 +52,3 @@ noLocation: true, | ||
const transformedDoc = transformations.reduce((doc, transform) => transform(doc), mergedDoc); | ||
const exportStatement = options.commonjs === false ? `export default ` : `module.exports = `; | ||
const exportStatement = options.esModule === true ? `export default` : `module.exports =`; | ||
return `${exportStatement} ${JSON.stringify(transformedDoc)}`; | ||
@@ -55,0 +55,0 @@ } |
@@ -1,1 +0,1 @@ | ||
export default function loader(this: any, path: string): string; | ||
export default function loader(this: any): string; |
@@ -34,6 +34,6 @@ import { loadTypedefsSync } from '@graphql-tools/load'; | ||
} | ||
function loader(path) { | ||
function loader() { | ||
this.cacheable(); | ||
const options = getOptions(this); | ||
const sources = loadTypedefsSync(path, { | ||
const sources = loadTypedefsSync(this.resourcePath, { | ||
loaders: [new GraphQLFileLoader()], | ||
@@ -50,3 +50,3 @@ noLocation: true, | ||
const transformedDoc = transformations.reduce((doc, transform) => transform(doc), mergedDoc); | ||
const exportStatement = options.commonjs === false ? `export default ` : `module.exports = `; | ||
const exportStatement = options.esModule === true ? `export default` : `module.exports =`; | ||
return `${exportStatement} ${JSON.stringify(transformedDoc)}`; | ||
@@ -53,0 +53,0 @@ } |
{ | ||
"name": "@graphql-tools/webpack-loader", | ||
"version": "6.0.12-alpha-7eed7f8.0", | ||
"version": "6.0.12-alpha-a455b31.0", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -10,4 +10,4 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@graphql-tools/load": "6.0.12-alpha-7eed7f8.0", | ||
"@graphql-tools/graphql-file-loader": "6.0.12-alpha-7eed7f8.0", | ||
"@graphql-tools/load": "6.0.12-alpha-a455b31.0", | ||
"@graphql-tools/graphql-file-loader": "6.0.12-alpha-a455b31.0", | ||
"loader-utils": "2.0.0", | ||
@@ -14,0 +14,0 @@ "tslib": "~2.0.0" |
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
12145
+ Added@graphql-tools/graphql-file-loader@6.0.12-alpha-a455b31.0(transitive)
+ Added@graphql-tools/import@6.0.12-alpha-a455b31.0(transitive)
+ Added@graphql-tools/load@6.0.12-alpha-a455b31.0(transitive)
+ Added@graphql-tools/merge@6.0.12-alpha-a455b31.0(transitive)
+ Added@graphql-tools/schema@6.0.12-alpha-a455b31.0(transitive)
+ Added@graphql-tools/utils@6.0.12-alpha-a455b31.0(transitive)
- Removed@graphql-tools/graphql-file-loader@6.0.12-alpha-7eed7f8.0(transitive)
- Removed@graphql-tools/import@6.0.12-alpha-7eed7f8.0(transitive)
- Removed@graphql-tools/load@6.0.12-alpha-7eed7f8.0(transitive)
- Removed@graphql-tools/merge@6.0.12-alpha-7eed7f8.0(transitive)
- Removed@graphql-tools/schema@6.0.12-alpha-7eed7f8.0(transitive)
- Removed@graphql-tools/utils@6.0.12-alpha-7eed7f8.0(transitive)
Updated@graphql-tools/graphql-file-loader@6.0.12-alpha-a455b31.0