@coderich/autograph 0.11.4 → 0.11.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coderich/autograph",
3
3
  "author": "Richard Livolsi (coderich)",
4
- "version": "0.11.4",
4
+ "version": "0.11.6",
5
5
  "description": "AutoGraph",
6
6
  "keywords": [
7
7
  "graphql",
@@ -30,7 +30,7 @@
30
30
  "ratchet": "ratchet"
31
31
  },
32
32
  "dependencies": {
33
- "@coderich/util": "1.0.5",
33
+ "@coderich/util": "1.0.7",
34
34
  "@hapi/boom": "^9.1.0",
35
35
  "dataloader": "^2.0.0",
36
36
  "deepmerge": "^4.2.2",
@@ -38,7 +38,7 @@
38
38
  "glob": "^9.3.5",
39
39
  "graphql-fields": "^2.0.3",
40
40
  "lodash": "^4.17.21",
41
- "mongodb": "4.17.0",
41
+ "mongodb": "6.8.0",
42
42
  "object-hash": "^3.0.0",
43
43
  "picomatch": "^2.1.1"
44
44
  },
@@ -46,7 +46,7 @@
46
46
  "@coderich/ratchet": "^1.5.8",
47
47
  "@graphql-tools/schema": "^9.0.1",
48
48
  "graphql": "^15.5.0",
49
- "mongodb-memory-server": "8.13.0",
49
+ "mongodb-memory-server": "10.0.0",
50
50
  "validator": "^13.7.0"
51
51
  },
52
52
  "peerDependencies": {
@@ -66,7 +66,6 @@ module.exports = class MongoDriver {
66
66
  }
67
67
 
68
68
  createOne({ model, input, options, flags }) {
69
- // console.log(JSON.stringify(input, null, 2));
70
69
  return this.query(model, 'insertOne', input, options, flags).then(result => Object.assign(input, { id: result.insertedId }));
71
70
  }
72
71
 
@@ -126,7 +125,7 @@ module.exports = class MongoDriver {
126
125
  if (value instanceof ObjectId) return value;
127
126
 
128
127
  try {
129
- const id = ObjectId(value);
128
+ const id = new ObjectId(value);
130
129
  return id;
131
130
  } catch (e) {
132
131
  return value;
@@ -140,7 +139,6 @@ module.exports = class MongoDriver {
140
139
  if (typeof value === 'function') return value.bind(target);
141
140
  const $value = map(value, v => (typeof v === 'string' ? globToRegex(v, { nocase: true, regex: true }) : v));
142
141
  if (Array.isArray($value)) {
143
- // console.log(Util.inspect({ value, $value }, { depth: null, showHidden: false, colors: true }));
144
142
  return { $in: $value };
145
143
  }
146
144
  return $value;