Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #6 from feathers-plus/merge-01
Browse files Browse the repository at this point in the history
Switched to lodash.merge from lodash.mergeWith
  • Loading branch information
eddyystop committed Feb 6, 2018
2 parents a99c26e + 4a6b038 commit f5f1ee1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
14 changes: 1 addition & 13 deletions lib/run-time/feathers/convert-args-to-feathers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

const merge = require('lodash.mergewith');
const merge = require('lodash.merge');
const convertArgsToParams = require('./convert-args-to-params');
const resolversAst = require('graphql-resolvers-ast');

Expand All @@ -19,18 +19,6 @@ module.exports = function convertArgsToFeathers(args, ast, moreParams = []) {
{ query: args.query || {} }, // { query } must be defined.
args.params || {},
...moreParams,
customizer
)
return convertArgsToParams(feathersParams);
};

function customizer(objValue, srcValue, key, obj, src, stack) {
return undefined; // Comment out to enable customization function.

if (typeof srcValue === 'object') {
if (srcValue instanceof ObjectID) {
return new ObjectID(srcValue.id);}
}

return undefined;
}
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@
"graphql-type-json": "0.1.4",
"join-monster": "2.0.15",
"join-monster-graphql-tools-adapter": "0.0.2",
"lodash": "4.17.4",
"lodash.mergewith": "4.6.0",
"lodash.merge": "4.6.1",
"mongo-sql": "4.0.2",
"traverse": "0.6.6"
},
Expand Down

0 comments on commit f5f1ee1

Please sign in to comment.