@graphql-codegen/typescript-mongodb 2.3.5 → 2.3.8

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/config.d.ts CHANGED
@@ -5,7 +5,7 @@ export interface TypeScriptMongoPluginConfig extends RawConfig {
5
5
  * @description Customize the suffix for the generated GraphQL `type`s.
6
6
  *
7
7
  * @exampleMarkdown
8
- * ```yml
8
+ * ```yaml
9
9
  * config:
10
10
  * dbTypeSuffix: MyType
11
11
  * ```
@@ -16,7 +16,7 @@ export interface TypeScriptMongoPluginConfig extends RawConfig {
16
16
  * @description Customize the suffix for the generated GraphQL `interface`s.
17
17
  *
18
18
  * @exampleMarkdown
19
- * ```yml
19
+ * ```yaml
20
20
  * config:
21
21
  * dbInterfaceSuffix: MyInterface
22
22
  * ```
@@ -27,7 +27,7 @@ export interface TypeScriptMongoPluginConfig extends RawConfig {
27
27
  * @description Customize the type of `_id` fields. You can either specify a type name, or specify `module#type`.
28
28
  *
29
29
  * @exampleMarkdown
30
- * ```yml
30
+ * ```yaml
31
31
  * config:
32
32
  * objectIdType: ./my-models.ts#MyIdType
33
33
  * ```
@@ -38,7 +38,7 @@ export interface TypeScriptMongoPluginConfig extends RawConfig {
38
38
  * @description Customize the name of the id field generated after using `@id` directive over a GraphQL field.
39
39
  *
40
40
  * @exampleMarkdown
41
- * ```yml
41
+ * ```yaml
42
42
  * config:
43
43
  * idFieldName: id
44
44
  * ```
@@ -49,7 +49,7 @@ export interface TypeScriptMongoPluginConfig extends RawConfig {
49
49
  * @description Replaces generated `enum` values with `string`.
50
50
  *
51
51
  * @exampleMarkdown
52
- * ```yml
52
+ * ```yaml
53
53
  * config:
54
54
  * enumsAsString: false
55
55
  * ```
@@ -62,7 +62,7 @@ export interface TypeScriptMongoPluginConfig extends RawConfig {
62
62
  * @default false
63
63
  *
64
64
  * @exampleMarkdown
65
- * ```yml
65
+ * ```yaml
66
66
  * generates:
67
67
  * path/to/file.ts:
68
68
  * plugins:
package/index.js CHANGED
@@ -200,7 +200,7 @@ class TsMongoVisitor extends visitorPluginCommon.BaseVisitor {
200
200
  return tree;
201
201
  }
202
202
  _addAdditionalFields(tree, additioalFields) {
203
- const avoidOptionals = this.config.avoidOptionals;
203
+ const { avoidOptionals } = this.config;
204
204
  if (!additioalFields || additioalFields.length === 0) {
205
205
  return;
206
206
  }
package/index.mjs CHANGED
@@ -194,7 +194,7 @@ class TsMongoVisitor extends BaseVisitor {
194
194
  return tree;
195
195
  }
196
196
  _addAdditionalFields(tree, additioalFields) {
197
- const avoidOptionals = this.config.avoidOptionals;
197
+ const { avoidOptionals } = this.config;
198
198
  if (!additioalFields || additioalFields.length === 0) {
199
199
  return;
200
200
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-codegen/typescript-mongodb",
3
- "version": "2.3.5",
3
+ "version": "2.3.8",
4
4
  "description": "GraphQL Code Generator plugin for generting a ready-to-use ORM types for MongoDB",
5
5
  "peerDependencies": {
6
6
  "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
@@ -8,12 +8,12 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@graphql-codegen/plugin-helpers": "^2.4.0",
11
- "@graphql-codegen/typescript": "^2.4.7",
12
- "@graphql-codegen/visitor-plugin-common": "2.7.3",
11
+ "@graphql-codegen/typescript": "^2.4.10",
12
+ "@graphql-codegen/visitor-plugin-common": "2.7.6",
13
13
  "@graphql-tools/utils": "^8.1.1",
14
14
  "auto-bind": "~4.0.0",
15
15
  "lodash": "~4.17.0",
16
- "tslib": "~2.3.0"
16
+ "tslib": "~2.4.0"
17
17
  },
18
18
  "repository": {
19
19
  "type": "git",