diff --git a/graph/resolvers/index.js b/graph/resolvers/index.js index 361cfa48f..05d633547 100644 --- a/graph/resolvers/index.js +++ b/graph/resolvers/index.js @@ -49,10 +49,10 @@ let resolvers = { * plugin based ones. This allows plugins to extend existing resolvers as well * as provide new ones. */ -resolvers = plugins.get('server', 'resolvers').reduce((resolvers, {plugin}) => { +resolvers = plugins.get('server', 'resolvers').reduce((acc, {plugin, resolvers}) => { debug(`added plugin '${plugin.name}'`); - return _.merge(resolvers, plugin.resolvers); + return _.merge(acc, resolvers); }, resolvers); module.exports = resolvers; diff --git a/plugins.js b/plugins.js index 3060008d5..d7c9f9426 100644 --- a/plugins.js +++ b/plugins.js @@ -23,9 +23,9 @@ try { /** * isInternal checks to see if a given plugin is internal, and returns true - * if it is. - * - * @param {String} name + * if it is. + * + * @param {String} name * @returns {Boolean} */ function isInternal(name) { @@ -38,9 +38,9 @@ function isInternal(name) { /** * Returns the plugin path for the given plugin name. - * - * @param {any} name - * @returns + * + * @param {any} name + * @returns */ function pluginPath(name) { if (isInternal(name)) { @@ -59,9 +59,9 @@ function itteratePlugins(plugins) { let plugin = {}; // This checks to see if the structure for this entry is an object: - // + // // {"people": "^1.2.0"} - // + // // otherwise it's checked whether it matches the local version: // // "people"