@graphql-codegen/core
Advanced tools
Comparing version 1.0.3-alpha-6bf93d2b.2 to 1.0.3-alpha-6f246129.6
@@ -10,9 +10,8 @@ "use strict"; | ||
validateDocuments(options.schema, options.documents); | ||
const plugins = Object.keys(options.pluginMap).map(key => options.pluginMap[key]); | ||
const pluginPackages = Object.keys(options.pluginMap).map(key => options.pluginMap[key]); | ||
// merged schema with parts added by plugins | ||
const schema = plugins.reduce((schema, plugin) => { | ||
const schema = pluginPackages.reduce((schema, plugin) => { | ||
return !plugin.addToSchema ? schema : merge_schemas_1.mergeSchemas([schema, plugin.addToSchema]); | ||
}, options.schema); | ||
for (let i = 0; i < plugins.length; i++) { | ||
const plugin = options.plugins[i]; | ||
for (const plugin of options.plugins) { | ||
const name = Object.keys(plugin)[0]; | ||
@@ -19,0 +18,0 @@ const pluginPackage = options.pluginMap[name]; |
@@ -8,9 +8,8 @@ import { visit } from 'graphql'; | ||
validateDocuments(options.schema, options.documents); | ||
const plugins = Object.keys(options.pluginMap).map(key => options.pluginMap[key]); | ||
const pluginPackages = Object.keys(options.pluginMap).map(key => options.pluginMap[key]); | ||
// merged schema with parts added by plugins | ||
const schema = plugins.reduce((schema, plugin) => { | ||
const schema = pluginPackages.reduce((schema, plugin) => { | ||
return !plugin.addToSchema ? schema : mergeSchemas([schema, plugin.addToSchema]); | ||
}, options.schema); | ||
for (let i = 0; i < plugins.length; i++) { | ||
const plugin = options.plugins[i]; | ||
for (const plugin of options.plugins) { | ||
const name = Object.keys(plugin)[0]; | ||
@@ -17,0 +16,0 @@ const pluginPackage = options.pluginMap[name]; |
{ | ||
"name": "@graphql-codegen/core", | ||
"version": "1.0.3-alpha-6bf93d2b.2+6bf93d2b", | ||
"version": "1.0.3-alpha-6f246129.6+6f246129", | ||
"license": "MIT", | ||
@@ -42,3 +42,3 @@ "repository": { | ||
"dependencies": { | ||
"@graphql-codegen/plugin-helpers": "1.0.3-alpha-6bf93d2b.2+6bf93d2b", | ||
"@graphql-codegen/plugin-helpers": "1.0.3-alpha-6f246129.6+6f246129", | ||
"graphql-toolkit": "0.2.7", | ||
@@ -60,3 +60,3 @@ "tslib": "1.9.3" | ||
}, | ||
"gitHead": "6bf93d2be8ffe1d73beac35871a971f7eb84f97a" | ||
"gitHead": "6f2461293fa16328d85aeb0a974529ecd8c407b1" | ||
} |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
25985
355