@graphql-codegen/typescript-mongodb 2.1.6 → 2.2.1-alpha-66fd7ef2f.0
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/index.js +2 -2
- package/index.mjs +3 -3
- package/package.json +5 -5
package/index.js
CHANGED
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
7
|
const pluginHelpers = require('@graphql-codegen/plugin-helpers');
|
|
8
|
-
const graphql = require('graphql');
|
|
9
8
|
const path = require('path');
|
|
10
9
|
const gql = _interopDefault(require('graphql-tag'));
|
|
11
10
|
const visitorPluginCommon = require('@graphql-codegen/visitor-plugin-common');
|
|
12
11
|
const set = _interopDefault(require('lodash/set.js'));
|
|
13
12
|
const autoBind = _interopDefault(require('auto-bind'));
|
|
13
|
+
const graphql = require('graphql');
|
|
14
14
|
|
|
15
15
|
class FieldsTree {
|
|
16
16
|
constructor() {
|
|
@@ -280,7 +280,7 @@ class TsMongoVisitor extends visitorPluginCommon.BaseVisitor {
|
|
|
280
280
|
const plugin = (schema, documents, config) => {
|
|
281
281
|
const visitor = new TsMongoVisitor(schema, config);
|
|
282
282
|
const astNode = pluginHelpers.getCachedDocumentNodeFromSchema(schema);
|
|
283
|
-
const visitorResult =
|
|
283
|
+
const visitorResult = pluginHelpers.oldVisit(astNode, { leave: visitor });
|
|
284
284
|
const header = visitor.objectIdImport;
|
|
285
285
|
return [header, ...visitorResult.definitions.filter(d => typeof d === 'string')].join('\n');
|
|
286
286
|
};
|
package/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { getCachedDocumentNodeFromSchema } from '@graphql-codegen/plugin-helpers';
|
|
2
|
-
import { Kind, isEnumType, visit } from 'graphql';
|
|
1
|
+
import { getCachedDocumentNodeFromSchema, oldVisit } from '@graphql-codegen/plugin-helpers';
|
|
3
2
|
import { extname } from 'path';
|
|
4
3
|
import gql from 'graphql-tag';
|
|
5
4
|
import { indent, BaseVisitor, getConfigValue, buildScalarsFromConfig, wrapTypeNodeWithModifiers, getBaseTypeNode, DeclarationBlock } from '@graphql-codegen/visitor-plugin-common';
|
|
6
5
|
import set from 'lodash/set.js';
|
|
7
6
|
import autoBind from 'auto-bind';
|
|
7
|
+
import { Kind, isEnumType } from 'graphql';
|
|
8
8
|
|
|
9
9
|
class FieldsTree {
|
|
10
10
|
constructor() {
|
|
@@ -274,7 +274,7 @@ class TsMongoVisitor extends BaseVisitor {
|
|
|
274
274
|
const plugin = (schema, documents, config) => {
|
|
275
275
|
const visitor = new TsMongoVisitor(schema, config);
|
|
276
276
|
const astNode = getCachedDocumentNodeFromSchema(schema);
|
|
277
|
-
const visitorResult =
|
|
277
|
+
const visitorResult = oldVisit(astNode, { leave: visitor });
|
|
278
278
|
const header = visitor.objectIdImport;
|
|
279
279
|
return [header, ...visitorResult.definitions.filter(d => typeof d === 'string')].join('\n');
|
|
280
280
|
};
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-mongodb",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.2.1-alpha-66fd7ef2f.0",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for generting a ready-to-use ORM types for MongoDB",
|
|
5
5
|
"peerDependencies": {
|
|
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",
|
|
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",
|
|
7
7
|
"graphql-tag": "^2.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@graphql-codegen/plugin-helpers": "^2.
|
|
11
|
-
"@graphql-codegen/typescript": "
|
|
12
|
-
"@graphql-codegen/visitor-plugin-common": "2.
|
|
10
|
+
"@graphql-codegen/plugin-helpers": "^2.3.0",
|
|
11
|
+
"@graphql-codegen/typescript": "2.3.1-alpha-66fd7ef2f.0",
|
|
12
|
+
"@graphql-codegen/visitor-plugin-common": "2.5.1-alpha-66fd7ef2f.0",
|
|
13
13
|
"@graphql-tools/utils": "^8.1.1",
|
|
14
14
|
"auto-bind": "~4.0.0",
|
|
15
15
|
"lodash": "~4.17.0",
|