diff --git a/.babelrc b/.babelrc index 1c63f140..8120acd4 100644 --- a/.babelrc +++ b/.babelrc @@ -13,7 +13,7 @@ "@babel/preset-env", { "targets": { - "node": 6 + "node": 8 } } ] @@ -28,7 +28,7 @@ "@babel/preset-env", { "targets": { - "node": "8.0.0" + "node": 8 }, "loose": true, "modules": false @@ -50,7 +50,7 @@ "@babel/preset-env", { "targets": { - "node": "8.0.0" + "node": 8 }, "loose": true, "modules": "commonjs" diff --git a/.eslintrc b/.eslintrc index f3167fda..8df49531 100644 --- a/.eslintrc +++ b/.eslintrc @@ -19,13 +19,9 @@ "objects": "always-multiline", "imports": "always-multiline", "exports": "always-multiline", - "functions": "ignore", - }], - "prettier/prettier": ["error", { - "printWidth": 100, - "singleQuote": true, - "trailingComma": "es5", + "functions": "ignore" }], + "prettier/prettier": ["error"], "import/prefer-default-export": 0, "arrow-parens": 0, "prefer-destructuring": 0, @@ -43,6 +39,6 @@ "Class": true, "Iterator": true, "$Shape": true, - "$Keys": true, + "$Keys": true } } diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..ddef5195 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "singleQuote": true, + "tabWidth": 2, + "useTabs": false, + "printWidth": 100, + "trailingComma": "es5" +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..d8afacbd --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,33 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Jest", + "type": "node", + "request": "launch", + "program": "${workspaceFolder}/node_modules/.bin/jest", + "args": ["--runInBand", "--watch"], + "cwd": "${workspaceFolder}", + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "disableOptimisticBPs": true + }, + { + "name": "Jest Current File", + "type": "node", + "request": "launch", + "program": "${workspaceFolder}/node_modules/.bin/jest", + "args": [ + "${fileBasenameNoExtension}", + "--config", + "jest.config.js" + ], + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "disableOptimisticBPs": true + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 64fcef25..c56020f8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,5 +3,6 @@ "eslint.validate": [ "javascript", ], - "javascript.validate.enable": false + "javascript.validate.enable": false, + "javascript.autoClosingTags": false, } diff --git a/README.md b/README.md index 9a554497..db584e9b 100644 --- a/README.md +++ b/README.md @@ -407,7 +407,7 @@ This library provides some amount of ready resolvers for fetch and update data w The prototype of before save hook: ```js -(doc: mixed, rp: ExtendedResolveParams) => Promise<*>, +(doc: mixed, rp: ResolverResolveParams) => Promise<*>, ``` The typical implementation may be like this: diff --git a/package.json b/package.json index cd5d04d0..8ea7688f 100644 --- a/package.json +++ b/package.json @@ -31,55 +31,49 @@ "object-path": "^0.11.4" }, "optionalDependencies": { - "graphql-compose-connection": ">=5.0.0", - "graphql-compose-pagination": ">=5.0.0" + "graphql-compose-connection": ">=6.0.0", + "graphql-compose-pagination": ">=6.0.0" }, "peerDependencies": { - "graphql-compose": ">=6.2.0", + "graphql-compose": ">=7.0.0", "mongoose": ">=5.0.0 || >=4.4.0" }, "devDependencies": { - "@babel/cli": "^7.4.3", - "@babel/core": "^7.4.3", - "@babel/plugin-proposal-class-properties": "^7.4.0", - "@babel/plugin-proposal-object-rest-spread": "^7.4.3", - "@babel/plugin-transform-flow-strip-types": "^7.4.0", - "@babel/plugin-transform-runtime": "^7.4.3", - "@babel/preset-env": "^7.4.3", + "@babel/cli": "^7.4.4", + "@babel/core": "^7.4.4", + "@babel/plugin-proposal-class-properties": "^7.4.4", + "@babel/plugin-proposal-object-rest-spread": "^7.4.4", + "@babel/plugin-transform-flow-strip-types": "^7.4.4", + "@babel/plugin-transform-runtime": "^7.4.4", + "@babel/preset-env": "^7.4.4", "@babel/preset-flow": "^7.0.0", "@types/graphql": "^14.2.0", "@types/mongoose": "5.2.10", "babel-core": "^7.0.0-bridge.0", "babel-eslint": "^10.0.1", "babel-jest": "^24.7.1", - "cz-conventional-changelog": "^2.1.0", "eslint": "^5.16.0", "eslint-config-airbnb-base": "^13.1.0", - "eslint-config-prettier": "^4.1.0", - "eslint-plugin-flowtype": "^3.5.1", - "eslint-plugin-import": "^2.16.0", + "eslint-config-prettier": "^4.2.0", + "eslint-plugin-flowtype": "^3.6.1", + "eslint-plugin-import": "^2.17.2", "eslint-plugin-prettier": "^3.0.1", - "flow-bin": "^0.96.0", + "flow-bin": "^0.98.0", "graphql": "14.2.1", - "graphql-compose": "^6.2.0", + "graphql-compose": "^7.0.0", "graphql-compose-connection": ">=5.0.0", "graphql-compose-pagination": ">=5.0.0", "jest": "^24.7.1", - "mongodb-memory-server": "^4.2.2", - "mongoose": "^5.4.22", - "prettier": "^1.16.4", + "mongodb-memory-server": "^5.1.0", + "mongoose": "^5.5.4", + "prettier": "^1.17.0", "request": "^2.88.0", "rimraf": "^2.6.3", "semantic-release": "^15.13.3", - "tslint": "^5.15.0", + "tslint": "^5.16.0", "tslint-config-prettier": "^1.18.0", "tslint-plugin-prettier": "^2.0.1", - "typescript": "^3.4.2" - }, - "config": { - "commitizen": { - "path": "./node_modules/cz-conventional-changelog" - } + "typescript": "^3.4.5" }, "scripts": { "build": "npm run build-lib && npm run build-mjs && npm run build-es && npm run build-node8 && npm run build-ts", diff --git a/src/__tests__/composeWithMongoose-test.js b/src/__tests__/composeWithMongoose-test.js index 276ceb2c..af624f70 100644 --- a/src/__tests__/composeWithMongoose-test.js +++ b/src/__tests__/composeWithMongoose-test.js @@ -138,9 +138,9 @@ describe('composeWithMongoose ->', () => { }, }).getInputTypeComposer(); - expect(itc.isRequired('name')).toBe(true); - expect(itc.isRequired('gender')).toBe(true); - expect(itc.isRequired('age')).toBe(false); + expect(itc.isFieldNonNull('name')).toBe(true); + expect(itc.isFieldNonNull('gender')).toBe(true); + expect(itc.isFieldNonNull('age')).toBe(false); }); }); @@ -208,9 +208,8 @@ describe('composeWithMongoose ->', () => { }, }, }); - const filterArgInFindOne: any = typeComposer.getResolver('findOne').getArg('filter'); - const itc = schemaComposer.createInputTC(filterArgInFindOne.type); - expect(itc.isRequired('age')).toBe(true); + const filterArgInFindOne = typeComposer.getResolver('findOne').getArgITC('filter'); + expect(filterArgInFindOne.isFieldNonNull('age')).toBe(true); }); it('should use cached type to avoid maximum call stack size exceeded', () => { diff --git a/src/__tests__/composeWithMongooseDiscriminators-test.js b/src/__tests__/composeWithMongooseDiscriminators-test.js index 53ab473f..01af3ddb 100644 --- a/src/__tests__/composeWithMongooseDiscriminators-test.js +++ b/src/__tests__/composeWithMongooseDiscriminators-test.js @@ -41,7 +41,7 @@ describe('composeWithMongooseDiscriminators ->', () => { }); const filterArgInFindOne: any = typeComposer.getResolver('findOne').getArg('filter'); const inputComposer = schemaComposer.createInputTC(filterArgInFindOne.type); - expect(inputComposer.isRequired('kind')).toBe(true); + expect(inputComposer.isFieldNonNull('kind')).toBe(true); }); it('should proceed customizationOptions.inputType.fields.required', () => { @@ -53,8 +53,8 @@ describe('composeWithMongooseDiscriminators ->', () => { }, }).getInputTypeComposer(); - expect(itc.isRequired('name')).toBe(true); - expect(itc.isRequired('friends')).toBe(true); + expect(itc.isFieldNonNull('name')).toBe(true); + expect(itc.isFieldNonNull('friends')).toBe(true); }); it('should be passed down record opts to resolvers', () => { @@ -68,8 +68,8 @@ describe('composeWithMongooseDiscriminators ->', () => { }, }, }); - const createOneRecordArgTC = typeComposer.getResolver('createOne').getArgTC('record'); - expect(createOneRecordArgTC.isRequired('name')).toBe(true); + const createOneRecordArgTC = typeComposer.getResolver('createOne').getArgITC('record'); + expect(createOneRecordArgTC.isFieldNonNull('name')).toBe(true); expect(createOneRecordArgTC.hasField('friends')).toBe(false); }); @@ -84,8 +84,8 @@ describe('composeWithMongooseDiscriminators ->', () => { }, }, }); - const createManyRecordsArgTC = typeComposer.getResolver('createMany').getArgTC('records'); - expect(createManyRecordsArgTC.isRequired('name')).toBe(true); + const createManyRecordsArgTC = typeComposer.getResolver('createMany').getArgITC('records'); + expect(createManyRecordsArgTC.isFieldNonNull('name')).toBe(true); expect(createManyRecordsArgTC.hasField('friends')).toBe(false); }); }); diff --git a/src/__tests__/fieldConverter-test.js b/src/__tests__/fieldConverter-test.js index a38334a2..f1fc1067 100644 --- a/src/__tests__/fieldConverter-test.js +++ b/src/__tests__/fieldConverter-test.js @@ -1,7 +1,7 @@ /* @flow */ /* eslint-disable no-unused-expressions, no-template-curly-in-string */ -import { EnumTypeComposer, schemaComposer } from 'graphql-compose'; +import { EnumTypeComposer, schemaComposer, ListComposer } from 'graphql-compose'; import { UserModel } from '../__mocks__/userModel'; import { deriveComplexType, @@ -125,19 +125,20 @@ describe('fieldConverter', () => { instance: 'ObjectID', }; expect(convertFieldToGraphQL(mongooseField, '', schemaComposer)).toBe('MongoID'); - expect(schemaComposer.get('MongoID')).toBe(GraphQLMongoID); + expect(schemaComposer.get('MongoID').getType()).toBe(GraphQLMongoID); }); it('should use existed GraphQLMongoID in schemaComposer', () => { schemaComposer.clear(); expect(schemaComposer.has('MongoID')).toBeFalsy(); - schemaComposer.set('MongoID', ('MockGraphQLType': any)); + const customType = schemaComposer.createScalarTC('MyMongoId'); + schemaComposer.set('MongoID', customType); const mongooseField = { path: 'strFieldName', instance: 'ObjectID', }; expect(convertFieldToGraphQL(mongooseField, '', schemaComposer)).toBe('MongoID'); - expect(schemaComposer.get('MongoID')).toBe('MockGraphQLType'); + expect(schemaComposer.get('MongoID')).toBe(customType); schemaComposer.delete('MongoID'); }); }); @@ -199,11 +200,11 @@ describe('fieldConverter', () => { it('test object with field as array', () => { const someDeepTC = embeddedToGraphQL(fields.someDeep, '', schemaComposer); expect(someDeepTC.getTypeName()).toBe('SomeDeep'); - const periodsType = (someDeepTC.getField('periods'): any).type; - expect(Array.isArray(periodsType)).toBeTruthy(); - expect(periodsType[0].getTypeName()).toBe('SomeDeepPeriods'); - expect(periodsType[0].hasField('from')).toBeTruthy(); - expect(periodsType[0].hasField('to')).toBeTruthy(); + expect(someDeepTC.getField('periods').type).toBeInstanceOf(ListComposer); + const tc = someDeepTC.getFieldOTC('periods'); + expect(tc.getTypeName()).toBe('SomeDeepPeriods'); + expect(tc.hasField('from')).toBeTruthy(); + expect(tc.hasField('to')).toBeTruthy(); }); }); diff --git a/src/__tests__/guthub_issues/117-test.js b/src/__tests__/github_issues/117-test.js similarity index 99% rename from src/__tests__/guthub_issues/117-test.js rename to src/__tests__/github_issues/117-test.js index 05fa11d6..ebb477e7 100644 --- a/src/__tests__/guthub_issues/117-test.js +++ b/src/__tests__/github_issues/117-test.js @@ -29,7 +29,6 @@ describe('issue #117', () => { surname: { type: String, required: true, - default: [], }, sex: { type: String, diff --git a/src/__tests__/guthub_issues/120-test.js b/src/__tests__/github_issues/120-test.js similarity index 100% rename from src/__tests__/guthub_issues/120-test.js rename to src/__tests__/github_issues/120-test.js diff --git a/src/__tests__/guthub_issues/135-test.js b/src/__tests__/github_issues/135-test.js similarity index 99% rename from src/__tests__/guthub_issues/135-test.js rename to src/__tests__/github_issues/135-test.js index 1c97930b..ce260e8f 100644 --- a/src/__tests__/guthub_issues/135-test.js +++ b/src/__tests__/github_issues/135-test.js @@ -65,7 +65,6 @@ describe('issue #135 - Mongoose virtuals', () => { schema, source: 'query { findMany { id title virtualField123 } }', }); - expect(res).toEqual({ data: { findMany: [ diff --git a/src/__tests__/guthub_issues/136-test.js b/src/__tests__/github_issues/136-test.js similarity index 99% rename from src/__tests__/guthub_issues/136-test.js rename to src/__tests__/github_issues/136-test.js index 850872d5..074b2058 100644 --- a/src/__tests__/guthub_issues/136-test.js +++ b/src/__tests__/github_issues/136-test.js @@ -35,7 +35,7 @@ describe('issue #136 - Mongoose virtuals', () => { const CommentTC = composeWithMongoose(Comment); CommentTC.wrapResolverAs('createManyFiltered', 'createMany', updateManyFiltered => { - const recordsTC = CommentTC.getResolver('createMany').getArgTC('records'); + const recordsTC = CommentTC.getResolver('createMany').getArgITC('records'); const clonedRecordTC = recordsTC.clone('createManyFilteredInput'); clonedRecordTC.removeField('links').addFields({ hi: 'String' }); updateManyFiltered.extendArg('records', { type: clonedRecordTC.getTypePlural() }); diff --git a/src/__tests__/guthub_issues/157-test.js b/src/__tests__/github_issues/157-test.js similarity index 100% rename from src/__tests__/guthub_issues/157-test.js rename to src/__tests__/github_issues/157-test.js diff --git a/src/__tests__/guthub_issues/78-test.js b/src/__tests__/github_issues/78-test.js similarity index 100% rename from src/__tests__/guthub_issues/78-test.js rename to src/__tests__/github_issues/78-test.js diff --git a/src/__tests__/guthub_issues/92-test.js b/src/__tests__/github_issues/92-test.js similarity index 100% rename from src/__tests__/guthub_issues/92-test.js rename to src/__tests__/github_issues/92-test.js diff --git a/src/__tests__/guthub_issues/93-test.js b/src/__tests__/github_issues/93-test.js similarity index 100% rename from src/__tests__/guthub_issues/93-test.js rename to src/__tests__/github_issues/93-test.js diff --git a/src/composeWithMongoose.js b/src/composeWithMongoose.js index 4437040a..6b574776 100644 --- a/src/composeWithMongoose.js +++ b/src/composeWithMongoose.js @@ -123,7 +123,7 @@ export function composeWithMongoose( const name: string = (opts && opts.name) || m.modelName; const sc = opts.schemaComposer || globalSchemaComposer; - sc.set('MongoID', MongoID); + sc.add(MongoID); const tc = convertModelToGraphQL((m: any), name, sc); if (opts.description) { @@ -185,7 +185,7 @@ export function prepareInputFields( inputTypeComposer.removeField(inputFieldsOpts.remove); } if (inputFieldsOpts.required) { - inputTypeComposer.makeRequired(inputFieldsOpts.required); + inputTypeComposer.makeFieldNonNull(inputFieldsOpts.required); } } diff --git a/src/discriminators/DiscriminatorTypeComposer.d.ts b/src/discriminators/DiscriminatorTypeComposer.d.ts index c8a8c0cb..c24b2ffa 100644 --- a/src/discriminators/DiscriminatorTypeComposer.d.ts +++ b/src/discriminators/DiscriminatorTypeComposer.d.ts @@ -1,10 +1,11 @@ import { - ComposeFieldConfig, - ComposeFieldConfigMap, + ObjectTypeComposerFieldConfigDefinition, + ObjectTypeComposerFieldConfigMapDefinition, + ObjectTypeComposerFieldConfigAsObjectDefinition, EnumTypeComposer, - GetRecordIdFn, + ObjectTypeComposerGetRecordIdFn, InterfaceTypeComposer, - RelationOpts, + ObjectTypeComposerRelationOpts, SchemaComposer, ObjectTypeComposer, } from 'graphql-compose'; @@ -59,33 +60,41 @@ export class DiscriminatorTypeComposer< // ------------------------------------------------ public setField( fieldName: string, - fieldConfig: ComposeFieldConfig, + fieldConfig: ObjectTypeComposerFieldConfigDefinition, ): this; public setField( fieldName: string, - fieldConfig: ComposeFieldConfig, + fieldConfig: ObjectTypeComposerFieldConfigDefinition< + TBaseModel, + TContext, + TArgs + >, ): this; - public setFields(fields: ComposeFieldConfigMap): this; + public setFields( + fields: ObjectTypeComposerFieldConfigMapDefinition, + ): this; - public setFields(fields: ComposeFieldConfigMap): this; + public setFields( + fields: ObjectTypeComposerFieldConfigMapDefinition, + ): this; // discriminators must have all interface fields public addFields( - newFields: ComposeFieldConfigMap, + newFields: ObjectTypeComposerFieldConfigMapDefinition, ): this; public addFields( - newFields: ComposeFieldConfigMap, + newFields: ObjectTypeComposerFieldConfigMapDefinition, ): this; public addNestedFields( - newFields: ComposeFieldConfigMap, + newFields: ObjectTypeComposerFieldConfigMapDefinition, ): this; public addNestedFields( - newFields: ComposeFieldConfigMap, + newFields: ObjectTypeComposerFieldConfigMapDefinition, ): this; public removeField(fieldNameOrArray: string | string[]): this; @@ -94,7 +103,9 @@ export class DiscriminatorTypeComposer< public extendField( fieldName: string, - partialFieldConfig: ComposeFieldConfig, + partialFieldConfig: Partial< + ObjectTypeComposerFieldConfigAsObjectDefinition + >, ): this; public reorderFields(names: string[]): this; @@ -109,13 +120,25 @@ export class DiscriminatorTypeComposer< public addRelation( fieldName: string, - relationOpts: RelationOpts, + ObjectTypeComposerRelationOpts: ObjectTypeComposerRelationOpts< + any, + TBaseModel, + TContext, + any + >, ): this; public addRelation( fieldName: string, - relationOpts: RelationOpts, + ObjectTypeComposerRelationOpts: ObjectTypeComposerRelationOpts< + TRelationSource, + TBaseModel, + TContext, + TArgs + >, ): this; - public setRecordIdFn(fn: GetRecordIdFn): this; + public setRecordIdFn( + fn: ObjectTypeComposerGetRecordIdFn, + ): this; } diff --git a/src/discriminators/DiscriminatorTypeComposer.js b/src/discriminators/DiscriminatorTypeComposer.js index a61e26dc..222470f3 100644 --- a/src/discriminators/DiscriminatorTypeComposer.js +++ b/src/discriminators/DiscriminatorTypeComposer.js @@ -2,16 +2,16 @@ import { EnumTypeComposer, - schemaComposer as globalSchemaComposer, SchemaComposer, ObjectTypeComposer, type InterfaceTypeComposer, - type ComposeFieldConfig, - type RelationOpts, - type GetRecordIdFn, - type ComposeFieldConfigMap, + type ObjectTypeComposerRelationOpts, + type ObjectTypeComposerGetRecordIdFn, + type ObjectTypeComposerFieldConfigDefinition, + type ObjectTypeComposerFieldConfigMapDefinition, + type ObjectTypeComposerFieldConfigAsObjectDefinition, + type Thunk, } from 'graphql-compose'; -import type { ComposeFieldConfigAsObject } from 'graphql-compose/lib/ObjectTypeComposer'; import type { Model } from 'mongoose'; import { composeWithMongoose, type ComposeWithMongooseOpts } from '../composeWithMongoose'; import { composeChildTC } from './composeChildTC'; @@ -71,6 +71,8 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp TSource, TContext > { + schemaComposer: SchemaComposer; + discriminatorKey: string; DKeyETC: EnumTypeComposer; @@ -81,16 +83,6 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp childTCs: ObjectTypeComposer[]; - static _getClassConnectedWithSchemaComposer( - schemaComposer?: SchemaComposer - ): Class> { - class _DiscriminatorTypeComposer extends DiscriminatorTypeComposer { - static schemaComposer = schemaComposer || globalSchemaComposer; - } - - return _DiscriminatorTypeComposer; - } - /* :: constructor(gqType: any, schemaComposer: SchemaComposer): DiscriminatorTypeComposer { super(gqType, schemaComposer); @@ -121,24 +113,22 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp }; const baseTC = composeWithMongoose(baseModel, opts); + const baseDTC = new DiscriminatorTypeComposer(baseTC.getType(), schemaComposer); - const _DiscriminatorTypeComposer = this._getClassConnectedWithSchemaComposer( - opts.schemaComposer - ); - const baseDTC = new _DiscriminatorTypeComposer(baseTC.getType(), schemaComposer); + // copy data from baseTC to baseDTC + baseTC.clone(baseDTC); + baseDTC._gqcInputTypeComposer = baseTC._gqcInputTypeComposer; baseDTC.opts = opts; baseDTC.childTCs = []; baseDTC.discriminatorKey = (baseModel: any).schema.get('discriminatorKey') || '__t'; + baseDTC.DInterface = baseDTC._createDInterface(baseDTC); + baseDTC.setInterfaces([baseDTC.DInterface]); // discriminators an object containing all discriminators with key being DNames baseDTC.DKeyETC = createAndSetDKeyETC(baseDTC, (baseModel: any).discriminators); reorderFields(baseDTC, (baseDTC.opts: any).reorderFields, baseDTC.discriminatorKey); - - baseDTC.DInterface = baseDTC._createDInterface(baseDTC); - baseDTC.setInterfaces([baseDTC.DInterface]); - baseDTC.schemaComposer.addSchemaMustHaveType(baseDTC); // prepare Base Resolvers @@ -150,6 +140,12 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp _createDInterface( baseTC: DiscriminatorTypeComposer ): InterfaceTypeComposer { + const baseFields = baseTC.getFieldNames(); + const interfaceFields = {}; + for (const field of baseFields) { + interfaceFields[field] = baseTC.getFieldConfig(field); + } + return this.schemaComposer.createInterfaceTC({ name: `${baseTC.getTypeName()}Interface`, @@ -163,14 +159,7 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp // as fallback return BaseModelTC return baseTC.schemaComposer.getOTC(baseTC.getTypeName()).getType(); }, - fields: (): ComposeFieldConfigMap => { - const baseFields = baseTC.getFieldNames(); - const interfaceFields = {}; - for (const field of baseFields) { - interfaceFields[field] = baseTC.getFieldConfig(field); - } - return interfaceFields; - }, + fields: interfaceFields, }); } @@ -207,9 +196,12 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp return childTC; } - setFields(fields: ComposeFieldConfigMap): DiscriminatorTypeComposer { + setFields( + fields: ObjectTypeComposerFieldConfigMapDefinition + ): DiscriminatorTypeComposer { const oldFieldNames = super.getFieldNames(); super.setFields(fields); + this.getDInterface().setFields(fields); for (const childTC of this.childTCs) { childTC.removeField(oldFieldNames); @@ -222,9 +214,10 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp setField( fieldName: string, - fieldConfig: ComposeFieldConfig + fieldConfig: Thunk> ): DiscriminatorTypeComposer { super.setField(fieldName, fieldConfig); + this.getDInterface().setField(fieldName, (fieldConfig: any)); for (const childTC of this.childTCs) { childTC.setField(fieldName, fieldConfig); @@ -235,9 +228,10 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp // discriminators must have all interface fields addFields( - newFields: ComposeFieldConfigMap + newFields: ObjectTypeComposerFieldConfigMapDefinition ): DiscriminatorTypeComposer { super.addFields(newFields); + this.getDInterface().addFields(newFields); for (const childTC of this.childTCs) { childTC.addFields(newFields); @@ -247,9 +241,10 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp } addNestedFields( - newFields: ComposeFieldConfigMap + newFields: ObjectTypeComposerFieldConfigMapDefinition ): DiscriminatorTypeComposer { super.addNestedFields(newFields); + this.getDInterface().setFields(this.getFields()); for (const childTC of this.childTCs) { childTC.addNestedFields(newFields); @@ -262,6 +257,7 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp fieldNameOrArray: string | Array ): DiscriminatorTypeComposer { super.removeField(fieldNameOrArray); + this.getDInterface().removeField(fieldNameOrArray); for (const childTC of this.childTCs) { childTC.removeField(fieldNameOrArray); @@ -275,6 +271,7 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp ): DiscriminatorTypeComposer { const oldFieldNames = super.getFieldNames(); super.removeOtherFields(fieldNameOrArray); + this.getDInterface().removeOtherFields(fieldNameOrArray); for (const childTC of this.childTCs) { const specificFields = childTC @@ -290,24 +287,26 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp return this; } - extendField( - fieldName: string, - partialFieldConfig: $Shape> - ): this { - super.extendField(fieldName, partialFieldConfig); + reorderFields(names: string[]): DiscriminatorTypeComposer { + super.reorderFields(names); + this.getDInterface().reorderFields(names); for (const childTC of this.childTCs) { - childTC.extendField(fieldName, partialFieldConfig); + childTC.reorderFields(names); } return this; } - reorderFields(names: string[]): DiscriminatorTypeComposer { - super.reorderFields(names); + extendField( + fieldName: string, + partialFieldConfig: $Shape> + ): this { + super.extendField(fieldName, partialFieldConfig); + this.getDInterface().extendField(fieldName, partialFieldConfig); for (const childTC of this.childTCs) { - childTC.reorderFields(names); + childTC.extendField(fieldName, partialFieldConfig); } return this; @@ -317,6 +316,7 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp fieldNameOrArray: string | Array ): DiscriminatorTypeComposer { super.makeFieldNonNull(fieldNameOrArray); + this.getDInterface().makeFieldNonNull(fieldNameOrArray); for (const childTC of this.childTCs) { childTC.makeFieldNonNull(fieldNameOrArray); @@ -329,6 +329,7 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp fieldNameOrArray: string | Array ): DiscriminatorTypeComposer { super.makeFieldNullable(fieldNameOrArray); + this.getDInterface().makeFieldNullable(fieldNameOrArray); for (const childTC of this.childTCs) { childTC.makeFieldNullable(fieldNameOrArray); @@ -337,10 +338,37 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp return this; } + makeFieldPlural( + fieldNameOrArray: string | Array + ): DiscriminatorTypeComposer { + super.makeFieldPlural(fieldNameOrArray); + this.getDInterface().makeFieldPlural(fieldNameOrArray); + + for (const childTC of this.childTCs) { + childTC.makeFieldPlural(fieldNameOrArray); + } + + return this; + } + + makeFieldNonPlural( + fieldNameOrArray: string | Array + ): DiscriminatorTypeComposer { + super.makeFieldNonPlural(fieldNameOrArray); + this.getDInterface().makeFieldNonPlural(fieldNameOrArray); + + for (const childTC of this.childTCs) { + childTC.makeFieldNonPlural(fieldNameOrArray); + } + + return this; + } + deprecateFields( fields: { [fieldName: string]: string } | string[] | string ): DiscriminatorTypeComposer { super.deprecateFields(fields); + this.getDInterface().deprecateFields(fields); for (const childTC of this.childTCs) { childTC.deprecateFields(fields); @@ -355,9 +383,10 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp // NOTE, those relations will be propagated to the childTypeComposers and you can use normally. addRelation( fieldName: string, - relationOpts: RelationOpts + relationOpts: ObjectTypeComposerRelationOpts ): DiscriminatorTypeComposer { super.addRelation(fieldName, relationOpts); + this.getDInterface().setField(fieldName, this.getField(fieldName)); for (const childTC of this.childTCs) { childTC.addRelation(fieldName, relationOpts); @@ -366,7 +395,9 @@ export class DiscriminatorTypeComposer extends ObjectTypeComp return this; } - setRecordIdFn(fn: GetRecordIdFn): DiscriminatorTypeComposer { + setRecordIdFn( + fn: ObjectTypeComposerGetRecordIdFn + ): DiscriminatorTypeComposer { super.setRecordIdFn(fn); for (const childTC of this.childTCs) { diff --git a/src/discriminators/__tests__/DiscriminatorTypeComposer-test.js b/src/discriminators/__tests__/DiscriminatorTypeComposer-test.js index d4d61423..d1e53085 100644 --- a/src/discriminators/__tests__/DiscriminatorTypeComposer-test.js +++ b/src/discriminators/__tests__/DiscriminatorTypeComposer-test.js @@ -73,6 +73,7 @@ describe('DiscriminatorTypeComposer', () => { describe('setFields(fields)', () => { let personSpecificFields; let droidSpecificFields; + let fieldsToSet; beforeAll(() => { schemaComposer.clear(); @@ -83,16 +84,14 @@ describe('DiscriminatorTypeComposer', () => { personSpecificFields = personTC.getFieldNames().filter(v => !characterDTC.hasField(v)); droidSpecificFields = droidTC.getFieldNames().filter(v => !characterDTC.hasField(v)); - }); - const fieldsToSet = { - kind: 'String', - appearsIn: 'String', - field1: 'String', - field2: 'String', - }; + fieldsToSet = { + kind: 'String', + appearsIn: 'String', + field1: 'String', + field2: 'String', + }; - beforeAll(() => { characterDTC.setFields(fieldsToSet); }); @@ -196,14 +195,12 @@ describe('DiscriminatorTypeComposer', () => { }); it('should have exactly plus two fields added to childTC fields', () => { - expect(droidTC.getFieldNames()).toEqual([ - ...characterDTC.getFieldNames(), - ...droidSpecificFields, - ]); - expect(personTC.getFieldNames()).toEqual([ - ...characterDTC.getFieldNames(), - ...personSpecificFields, - ]); + expect(droidTC.getFieldNames().sort()).toEqual( + [...characterDTC.getFieldNames(), ...droidSpecificFields].sort() + ); + expect(personTC.getFieldNames().sort()).toEqual( + [...characterDTC.getFieldNames(), ...personSpecificFields].sort() + ); }); }); @@ -527,7 +524,7 @@ describe('DiscriminatorTypeComposer', () => { }, }, }); - const createOneRecordArgTC = personTC.getResolver('createOne').getArgTC('record'); + const createOneRecordArgTC = personTC.getResolver('createOne').getArgITC('record'); expect(createOneRecordArgTC.isRequired('name')).toBe(true); expect(createOneRecordArgTC.isRequired('dob')).toBe(true); expect(createOneRecordArgTC.hasField('friends')).toBe(false); diff --git a/src/discriminators/__tests__/prepareBaseResolvers-test.js b/src/discriminators/__tests__/prepareBaseResolvers-test.js index 8c7f06eb..0f01f73f 100644 --- a/src/discriminators/__tests__/prepareBaseResolvers-test.js +++ b/src/discriminators/__tests__/prepareBaseResolvers-test.js @@ -1,6 +1,5 @@ /* @flow */ -import { graphql } from 'graphql-compose'; import { composeWithMongooseDiscriminators } from '../../composeWithMongooseDiscriminators'; import { getCharacterModels } from '../__mocks__/characterModels'; @@ -41,8 +40,8 @@ describe('prepareBaseResolvers()', () => { it('should set DKey field type to DKeyETC on filter args', () => { for (const resolver of resolversWithFilterArgs) { expect(interestArgs[0]).toEqual('filter'); - expect(resolver.getArgTC(interestArgs[0]).getFieldConfig(DKeyFieldName).type).toEqual( - CharacterDTC.getDKeyETC().getType() + expect(resolver.getArgITC(interestArgs[0]).getFieldTC(DKeyFieldName)).toEqual( + CharacterDTC.getDKeyETC() ); } }); @@ -51,13 +50,10 @@ describe('prepareBaseResolvers()', () => { for (const resolver of resolversWithRecordArgs) { expect(interestArgs[1]).toEqual('record'); if (resolver.name === 'createOne') { - expect(resolver.getArgTC(interestArgs[1]).getFieldConfig(DKeyFieldName).type).toEqual( - graphql.GraphQLNonNull(DKeyETC.getType()) - ); + expect(resolver.getArgITC(interestArgs[1]).isFieldNonNull(DKeyFieldName)).toBeTruthy(); + expect(resolver.getArgITC(interestArgs[1]).getFieldTC(DKeyFieldName)).toEqual(DKeyETC); } else { - expect(resolver.getArgTC(interestArgs[1]).getFieldConfig(DKeyFieldName).type).toEqual( - DKeyETC.getType() - ); + expect(resolver.getArgITC(interestArgs[1]).getFieldTC(DKeyFieldName)).toEqual(DKeyETC); } } }); @@ -65,9 +61,8 @@ describe('prepareBaseResolvers()', () => { it('should set DKey field type to DKeyETC on records args', () => { for (const resolver of resolversWithRecordsArgs) { expect(interestArgs[2]).toEqual('records'); - expect(resolver.getArgTC(interestArgs[2]).getFieldConfig(DKeyFieldName).type).toEqual( - graphql.GraphQLNonNull(DKeyETC.getType()) - ); + expect(resolver.getArgITC(interestArgs[2]).isFieldNonNull(DKeyFieldName)).toBeTruthy(); + expect(resolver.getArgITC(interestArgs[2]).getFieldTC(DKeyFieldName)).toEqual(DKeyETC); } }); }); @@ -75,33 +70,30 @@ describe('prepareBaseResolvers()', () => { describe('createOne: Resolver', () => { const resolver = CharacterDTC.getResolver('createOne'); it('should set resolver record field type to DInterface', () => { - expect(resolver.getTypeComposer().getFieldType('record')).toEqual(DInterfaceTC.getType()); + expect(resolver.getOTC().getFieldType('record')).toEqual(DInterfaceTC.getType()); }); }); describe('createMany: Resolver', () => { const resolver = CharacterDTC.getResolver('createMany'); it('should set resolver records field type to NonNull Plural DInterface', () => { - expect(resolver.getTypeComposer().getFieldType('records')).toEqual( - new graphql.GraphQLNonNull(graphql.GraphQLList(DInterfaceTC.getType())) - ); + expect(resolver.getOTC().getFieldTC('records')).toBe(DInterfaceTC); + expect(resolver.getOTC().getFieldTypeName('records')).toBe('[CharacterInterface]!'); }); }); describe('findById: Resolver', () => { const resolver = CharacterDTC.getResolver('findByIds'); it('should set resolver type to DInterface List', () => { - expect(resolver.getType()).toEqual( - graphql.GraphQLList(CharacterDTC.getDInterface().getType()) - ); + expect(resolver.getTypeComposer()).toEqual(CharacterDTC.getDInterface()); + expect(resolver.getTypeName()).toEqual('[CharacterInterface]'); }); }); describe('findMany: Resolver', () => { it('should set resolver type to DInterface List', () => { - expect(CharacterDTC.getResolver('findMany').getType()).toEqual( - graphql.GraphQLList(DInterfaceTC.getType()) - ); + expect(CharacterDTC.getResolver('findMany').getTypeComposer()).toEqual(DInterfaceTC); + expect(CharacterDTC.getResolver('findMany').getTypeName()).toBe('[CharacterInterface]'); }); }); @@ -120,7 +112,7 @@ describe('prepareBaseResolvers()', () => { it('should set resolver record field type to DInterface, updateOne', () => { expect( CharacterDTC.getResolver('updateOne') - .getTypeComposer() + .getOTC() .getFieldType('record') ).toEqual(CharacterDTC.getDInterface().getType()); }); @@ -128,7 +120,7 @@ describe('prepareBaseResolvers()', () => { it('should set resolver record field type to DInterface, updateById', () => { expect( CharacterDTC.getResolver('updateById') - .getTypeComposer() + .getOTC() .getFieldType('record') ).toEqual(CharacterDTC.getDInterface().getType()); }); @@ -136,7 +128,7 @@ describe('prepareBaseResolvers()', () => { it('should set resolver record field type to DInterface, ', () => { expect( CharacterDTC.getResolver('removeById') - .getTypeComposer() + .getOTC() .getFieldType('record') ).toEqual(CharacterDTC.getDInterface().getType()); }); @@ -144,17 +136,27 @@ describe('prepareBaseResolvers()', () => { it('should set DKey field type to NonNull(DKeyETC) on record arg, createOne', () => { expect( CharacterDTC.getResolver('createOne') - .getArgTC('record') - .getFieldType(CharacterDTC.getDKey()) - ).toEqual(graphql.GraphQLNonNull(CharacterDTC.getDKeyETC().getType())); + .getArgITC('record') + .getFieldTC(CharacterDTC.getDKey()) + ).toEqual(CharacterDTC.getDKeyETC()); + expect( + CharacterDTC.getResolver('createOne') + .getArgITC('record') + .getFieldTypeName(CharacterDTC.getDKey()) + ).toBe('EnumDKeyCharacterType!'); }); it('should set type on items in pagination resolver to DInterface List, pagination', () => { expect( CharacterDTC.getResolver('pagination') - .getTypeComposer() - .getFieldType('items') - ).toEqual(graphql.GraphQLList(CharacterDTC.getDInterface().getType())); + .getOTC() + .getFieldTC('items') + ).toEqual(CharacterDTC.getDInterface()); + expect( + CharacterDTC.getResolver('pagination') + .getOTC() + .getFieldTypeName('items') + ).toBe('[CharacterInterface]'); }); it('should clone, rename edges field on connection resolver, connection', () => { @@ -163,7 +165,7 @@ describe('prepareBaseResolvers()', () => { expect( connectionRS - .getTypeComposer() + .getOTC() .getFieldTC('edges') .getTypeName() ).toEqual(newName); diff --git a/src/discriminators/__tests__/prepareChildResolvers-test.js b/src/discriminators/__tests__/prepareChildResolvers-test.js index 4158dd0c..b6cf443a 100644 --- a/src/discriminators/__tests__/prepareChildResolvers-test.js +++ b/src/discriminators/__tests__/prepareChildResolvers-test.js @@ -75,21 +75,21 @@ describe('prepareChildResolvers()', () => { it('should hide DKey field on filter args', () => { for (const resolver of resolversWithFilterArgs) { expect(interestArgs[0]).toEqual('filter'); - expect(resolver.getArgTC(interestArgs[0]).hasField(DKeyFieldName)).toBeFalsy(); + expect(resolver.getArgITC(interestArgs[0]).hasField(DKeyFieldName)).toBeFalsy(); } }); it('should hide DKey field on record args', () => { for (const resolver of resolversWithRecordArgs) { expect(interestArgs[1]).toEqual('record'); - expect(resolver.getArgTC(interestArgs[1]).hasField(DKeyFieldName)).toBeFalsy(); + expect(resolver.getArgITC(interestArgs[1]).hasField(DKeyFieldName)).toBeFalsy(); } }); it('should hide DKey field on records args', () => { for (const resolver of resolversWithRecordsArgs) { expect(interestArgs[2]).toEqual('records'); - expect(resolver.getArgTC(interestArgs[2]).hasField(DKeyFieldName)).toBeFalsy(); + expect(resolver.getArgITC(interestArgs[2]).hasField(DKeyFieldName)).toBeFalsy(); } }); }); @@ -112,11 +112,11 @@ describe('prepareChildResolvers()', () => { expect( baseDTC .getResolver('createOne') - .getArgTC('record') + .getArgITC('record') .getFieldType('kind') ).toEqual( PersonTC.getResolver('createOne') - .getArgTC('record') + .getArgITC('record') .getFieldType('kind') ); }); diff --git a/src/discriminators/composeChildTC.js b/src/discriminators/composeChildTC.js index d6149e9f..320cd539 100644 --- a/src/discriminators/composeChildTC.js +++ b/src/discriminators/composeChildTC.js @@ -18,11 +18,11 @@ function copyBaseTCFieldsToChildTC( const childFields = childTC.getFieldNames(); for (const field of baseFields) { - const childFieldName = childFields.find(fld => fld === field); + const isFieldExists = childFields.find(fld => fld === field); - if (childFieldName) { + if (isFieldExists) { childTC.extendField(field, { - type: baseDTC.getFieldType(field), + type: baseDTC.getField(field).type, }); } else { childTC.setField(field, baseDTC.getField(field)); @@ -39,7 +39,7 @@ export function composeChildTC( ): ObjectTypeComposer { const composedChildTC = copyBaseTCFieldsToChildTC(baseDTC, childTC); - composedChildTC.setInterfaces([baseDTC.getDInterface()]); + composedChildTC.addInterface(baseDTC.getDInterface()); prepareChildResolvers(baseDTC, composedChildTC, opts); diff --git a/src/discriminators/prepareBaseResolvers.js b/src/discriminators/prepareBaseResolvers.js index 82dd5d1d..92b4e57f 100644 --- a/src/discriminators/prepareBaseResolvers.js +++ b/src/discriminators/prepareBaseResolvers.js @@ -1,11 +1,8 @@ /* @flow */ -import { graphql } from 'graphql-compose'; import { EMCResolvers } from '../resolvers'; import { DiscriminatorTypeComposer } from './DiscriminatorTypeComposer'; -const { GraphQLList, GraphQLNonNull } = graphql; - // change type on DKey generated by composeWithMongoose // set it to created enum ObjectTypeComposer for DKey DKeyETC // only sets on filter and record typeComposers, since they contain our DKey @@ -16,7 +13,7 @@ function setDKeyEnumOnITCArgs(resolver, baseTC: DiscriminatorTypeComposer switch (resolverName) { case EMCResolvers.findMany: case EMCResolvers.findByIds: - resolver.setType(new GraphQLList(baseTC.getDInterface().getType())); + resolver.setType(baseTC.getDInterface().getTypePlural()); break; case EMCResolvers.findById: @@ -52,39 +49,43 @@ export function prepareBaseResolvers(baseTC: DiscriminatorTypeComposer case EMCResolvers.updateById: case EMCResolvers.removeOne: case EMCResolvers.removeById: - resolver.getTypeComposer().extendField('record', { + resolver.getOTC().extendField('record', { type: baseTC.getDInterface(), }); break; case EMCResolvers.createMany: - resolver.getTypeComposer().extendField('records', { - type: new GraphQLNonNull(GraphQLList(baseTC.getDInterface().getType())), + resolver.getOTC().extendField('records', { + type: baseTC + .getDInterface() + .getTypePlural() + .getTypeNonNull(), }); break; case EMCResolvers.pagination: - resolver.getTypeComposer().extendField('items', { - type: new GraphQLList(baseTC.getDInterface().getType()), + resolver.getOTC().extendField('items', { + type: baseTC.getDInterface().getTypePlural(), }); break; case EMCResolvers.connection: const edgesTC = resolver // eslint-disable-line no-case-declarations - .getTypeComposer() + .getOTC() .getFieldOTC('edges') .clone(`${baseTC.getTypeName()}Edge`); edgesTC.extendField('node', { - type: new GraphQLNonNull(baseTC.getDInterface().getType()), + type: baseTC.getDInterface().getTypeNonNull(), }); - resolver - .getTypeComposer() - .setField( - 'edges', - new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(edgesTC.getType()))) - ); + resolver.getOTC().setField( + 'edges', + edgesTC + .getTypeNonNull() + .getTypePlural() + .getTypeNonNull() + ); break; default: @@ -96,7 +97,7 @@ export function prepareBaseResolvers(baseTC: DiscriminatorTypeComposer // must be done after setting DKeyEnum if (resolverName === EMCResolvers.createOne || resolverName === EMCResolvers.createMany) { const fieldName = resolverName === EMCResolvers.createMany ? 'records' : 'record'; - resolver.getArgTC(fieldName).extendField(baseTC.getDKey(), { + resolver.getArgITC(fieldName).extendField(baseTC.getDKey(), { type: baseTC.getDKeyETC().getTypeNonNull(), }); } diff --git a/src/discriminators/prepareChildResolvers.js b/src/discriminators/prepareChildResolvers.js index 912df372..8c64ad79 100644 --- a/src/discriminators/prepareChildResolvers.js +++ b/src/discriminators/prepareChildResolvers.js @@ -1,6 +1,6 @@ /* @flow */ -import type { ResolveParams, Resolver, ObjectTypeComposer } from 'graphql-compose'; +import type { ResolverResolveParams, Resolver, ObjectTypeComposer } from 'graphql-compose'; import { type ComposeWithMongooseDiscriminatorsOpts, DiscriminatorTypeComposer, @@ -17,7 +17,7 @@ function setQueryDKey( fromField: string ) { if (resolver) { - resolver.wrapResolve(next => (resolve: ResolveParams) => { + resolver.wrapResolve(next => (resolve: ResolverResolveParams) => { const DName = childTC.getTypeName(); /* eslint no-param-reassign: 0 */ @@ -56,7 +56,7 @@ function hideDKey( hideDKey(resolver, childTC, DKey, field); } } else if (fromField && resolver.hasArg(fromField)) { - const fieldTC = resolver.getArgTC(fromField); + const fieldTC = resolver.getArgITC(fromField); if (fieldTC) { fieldTC.removeField(DKey); @@ -82,14 +82,14 @@ function copyResolverArgTypes( baseDTC.hasResolver(resolver.name) && baseDTC.getResolver(resolver.name).hasArg(fromArg) ) { - const childResolverArgTc = resolver.getArgTC(fromArg); - const baseResolverArgTC = baseDTC.getResolver(resolver.name).getArgTC(fromArg); + const childResolverArgTC = resolver.getArgITC(fromArg); + const baseResolverArgTC = baseDTC.getResolver(resolver.name).getArgITC(fromArg); const baseResolverArgTCFields = baseResolverArgTC.getFieldNames(); for (const baseArgField of baseResolverArgTCFields) { - if (childResolverArgTc.hasField(baseArgField) && baseArgField !== '_id') { - childResolverArgTc.extendField(baseArgField, { - type: baseResolverArgTC.getFieldType(baseArgField), + if (childResolverArgTC.hasField(baseArgField) && baseArgField !== '_id') { + childResolverArgTC.extendField(baseArgField, { + type: baseResolverArgTC.getField(baseArgField).type, }); } } @@ -111,7 +111,7 @@ function reorderFieldsRecordFilter( reorderFieldsRecordFilter(resolver, baseDTC, order, field); } } else if (fromField && resolver.hasArg(fromField)) { - const argTC = resolver.getArgTC(fromField); + const argTC = resolver.getArgITC(fromField); if (Array.isArray(order)) { argTC.reorderFields(order); diff --git a/src/fieldsConverter.d.ts b/src/fieldsConverter.d.ts index 7837f399..c01b5124 100644 --- a/src/fieldsConverter.d.ts +++ b/src/fieldsConverter.d.ts @@ -2,7 +2,7 @@ import { EnumTypeComposer, SchemaComposer, ObjectTypeComposer, - ComposeOutputType, + ComposeOutputTypeDefinition, } from 'graphql-compose'; import { GraphQLScalarType } from 'graphql-compose/lib/graphql'; import { Model, Schema } from 'mongoose'; @@ -51,7 +51,7 @@ export function convertFieldToGraphQL( field: MongooseFieldT, prefix: string | undefined, schemaComposer: SchemaComposer, -): ComposeOutputType; +): ComposeOutputTypeDefinition; export function deriveComplexType( field: MongooseFieldT, @@ -63,7 +63,7 @@ export function arrayToGraphQL( field: MongooseFieldT, prefix: string | undefined, schemaComposer: SchemaComposer, -): ComposeOutputType; +): ComposeOutputTypeDefinition; export function embeddedToGraphQL( field: MongooseFieldT, diff --git a/src/fieldsConverter.js b/src/fieldsConverter.js index 116be772..3fb19c7d 100644 --- a/src/fieldsConverter.js +++ b/src/fieldsConverter.js @@ -8,7 +8,7 @@ import type { SchemaComposer, ObjectTypeComposer, EnumTypeComposer, - ComposeOutputType, + ComposeOutputTypeDefinition, } from 'graphql-compose'; import { upperFirst } from 'graphql-compose'; import type { GraphQLScalarType } from 'graphql-compose/lib/graphql'; @@ -190,9 +190,9 @@ export function convertFieldToGraphQL( field: MongooseFieldT, prefix?: string = '', schemaComposer: SchemaComposer -): ComposeOutputType { +): ComposeOutputTypeDefinition { if (!schemaComposer.has('MongoID')) { - schemaComposer.set('MongoID', GraphQLMongoID); + schemaComposer.add(GraphQLMongoID); } const complexType = deriveComplexType(field); @@ -276,7 +276,7 @@ export function arrayToGraphQL( field: MongooseFieldT, prefix?: string = '', schemaComposer: SchemaComposer -): ComposeOutputType { +): ComposeOutputTypeDefinition { if (!field || !field.caster) { throw new Error( 'You provide incorrect mongoose field to `arrayToGraphQL()`. ' + @@ -286,7 +286,7 @@ export function arrayToGraphQL( const unwrappedField = { ...field.caster }; - const outputType = convertFieldToGraphQL(unwrappedField, prefix, schemaComposer); + const outputType: any = convertFieldToGraphQL(unwrappedField, prefix, schemaComposer); return [outputType]; } diff --git a/src/resolvers/__tests__/connection-test.js b/src/resolvers/__tests__/connection-test.js index 278f86fb..cf59c3fe 100644 --- a/src/resolvers/__tests__/connection-test.js +++ b/src/resolvers/__tests__/connection-test.js @@ -135,7 +135,8 @@ describe('connection() resolver', () => { relocation: false, }); - await Promise.all([user1.save(), user2.save()]); + await user1.save(); + await user2.save(); }); it('should return Resolver object', () => { diff --git a/src/resolvers/__tests__/count-test.js b/src/resolvers/__tests__/count-test.js index 7001dc29..56373350 100644 --- a/src/resolvers/__tests__/count-test.js +++ b/src/resolvers/__tests__/count-test.js @@ -37,7 +37,8 @@ describe('count() ->', () => { relocation: false, }); - await Promise.all([user1.save(), user2.save()]); + await user1.save(); + await user2.save(); }); it('should return Resolver object', () => { diff --git a/src/resolvers/__tests__/findMany-test.js b/src/resolvers/__tests__/findMany-test.js index 20885d12..33b6b0e8 100644 --- a/src/resolvers/__tests__/findMany-test.js +++ b/src/resolvers/__tests__/findMany-test.js @@ -36,7 +36,8 @@ describe('findMany() ->', () => { relocation: false, }); - await Promise.all([user1.save(), user2.save()]); + await user1.save(); + await user2.save(); }); it('should return Resolver object', () => { diff --git a/src/resolvers/__tests__/findOne-test.js b/src/resolvers/__tests__/findOne-test.js index e1e50742..80222938 100644 --- a/src/resolvers/__tests__/findOne-test.js +++ b/src/resolvers/__tests__/findOne-test.js @@ -33,7 +33,8 @@ beforeEach(async () => { relocation: false, }); - await Promise.all([user1.save(), user2.save()]); + await user1.save(); + await user2.save(); }); describe('findOne() ->', () => { @@ -52,7 +53,7 @@ describe('findOne() ->', () => { const resolver = findOne(UserModel, UserTC, { filter: { onlyIndexed: true, operators: false }, }); - expect(resolver.getArgTC('filter').getFieldNames()).toEqual( + expect(resolver.getArgITC('filter').getFieldNames()).toEqual( expect.arrayContaining(['_id', 'name', 'employment']) ); }); @@ -61,7 +62,7 @@ describe('findOne() ->', () => { const resolver = findOne(UserModel, UserTC, { filter: { requiredFields: 'name' }, }); - expect(resolver.getArgTC('filter').getFieldType('name')).toBeInstanceOf(GraphQLNonNull); + expect(resolver.getArgITC('filter').getFieldType('name')).toBeInstanceOf(GraphQLNonNull); }); it('should have `skip` arg', () => { diff --git a/src/resolvers/__tests__/pagination-test.js b/src/resolvers/__tests__/pagination-test.js index c416d5b0..22b54bb4 100644 --- a/src/resolvers/__tests__/pagination-test.js +++ b/src/resolvers/__tests__/pagination-test.js @@ -40,7 +40,8 @@ describe('pagination() ->', () => { relocation: false, }); - await Promise.all([user1.save(), user2.save()]); + await user1.save(); + await user2.save(); }); it('should return Resolver object', () => { diff --git a/src/resolvers/__tests__/updateById-test.js b/src/resolvers/__tests__/updateById-test.js index 83a8b2d2..a41046f6 100644 --- a/src/resolvers/__tests__/updateById-test.js +++ b/src/resolvers/__tests__/updateById-test.js @@ -44,7 +44,8 @@ describe('updateById() ->', () => { relocation: true, }); - await Promise.all([user1.save(), user2.save()]); + await user1.save(); + await user2.save(); }); it('should return Resolver object', () => { diff --git a/src/resolvers/__tests__/updateMany-test.js b/src/resolvers/__tests__/updateMany-test.js index 22486bdf..15f8e7ae 100644 --- a/src/resolvers/__tests__/updateMany-test.js +++ b/src/resolvers/__tests__/updateMany-test.js @@ -38,7 +38,8 @@ describe('updateMany() ->', () => { relocation: true, }); - await Promise.all([user1.save(), user2.save()]); + await user1.save(); + await user2.save(); }); it('should return Resolver object', () => { diff --git a/src/resolvers/__tests__/updateOne-test.js b/src/resolvers/__tests__/updateOne-test.js index 54ea43e4..293aa55a 100644 --- a/src/resolvers/__tests__/updateOne-test.js +++ b/src/resolvers/__tests__/updateOne-test.js @@ -40,7 +40,8 @@ describe('updateOne() ->', () => { relocation: true, }); - await Promise.all([user1.save(), user2.save()]); + await user1.save(); + await user2.save(); }); it('should return Resolver object', () => { diff --git a/src/resolvers/createMany.js b/src/resolvers/createMany.js index f533a513..ff1b912c 100644 --- a/src/resolvers/createMany.js +++ b/src/resolvers/createMany.js @@ -1,7 +1,6 @@ /* @flow */ import type { ObjectTypeComposer, Resolver } from 'graphql-compose'; -import { graphql } from 'graphql-compose'; import type { MongooseModel, MongooseDocument } from 'mongoose'; import { recordHelperArgs } from './helpers'; import type { ExtendedResolveParams, GenResolverOpts } from './index'; @@ -56,7 +55,7 @@ export default function createMany( description: 'Created document ID', }, records: { - type: new graphql.GraphQLNonNull(tc.getTypePlural()), + type: tc.getTypePlural().getTypeNonNull(), description: 'Created documents', }, createCount: { @@ -73,17 +72,15 @@ export default function createMany( type: outputType, args: { records: { - type: new graphql.GraphQLNonNull( - new graphql.GraphQLList( - (recordHelperArgs(tc, { - recordTypeName: `CreateMany${tc.getTypeName()}Input`, - removeFields: ['id', '_id'], - isRequired: true, - requiredFields, - ...(opts && opts.records), - }).record: any).type - ) - ), + type: (recordHelperArgs(tc, { + recordTypeName: `CreateMany${tc.getTypeName()}Input`, + removeFields: ['id', '_id'], + isRequired: true, + requiredFields, + ...(opts && opts.records), + }).record: any).type + .getTypePlural() + .getTypeNonNull(), }, }, resolve: async (resolveParams: ExtendedResolveParams) => { diff --git a/src/resolvers/findById.js b/src/resolvers/findById.js index 82a57631..dfd4de64 100644 --- a/src/resolvers/findById.js +++ b/src/resolvers/findById.js @@ -19,7 +19,7 @@ export default function findById( } return tc.schemaComposer.createResolver({ - type: tc.getType(), + type: tc, name: 'findById', kind: 'query', args: { diff --git a/src/resolvers/findOne.js b/src/resolvers/findOne.js index 131a1579..c875fd05 100644 --- a/src/resolvers/findOne.js +++ b/src/resolvers/findOne.js @@ -28,7 +28,7 @@ export default function findOne( } return tc.schemaComposer.createResolver({ - type: tc.getType(), + type: tc, name: 'findOne', kind: 'query', args: { diff --git a/src/resolvers/helpers/__tests__/filter-test.js b/src/resolvers/helpers/__tests__/filter-test.js index 74a0571a..8950612e 100644 --- a/src/resolvers/helpers/__tests__/filter-test.js +++ b/src/resolvers/helpers/__tests__/filter-test.js @@ -1,10 +1,14 @@ /* @flow */ -import { schemaComposer, type ObjectTypeComposer } from 'graphql-compose'; -import { GraphQLInputObjectType, GraphQLNonNull, GraphQLList } from 'graphql-compose/lib/graphql'; +import { + schemaComposer, + ObjectTypeComposer, + InputTypeComposer, + NonNullComposer, + ListComposer, +} from 'graphql-compose'; import { filterHelperArgs, filterHelper } from '../filter'; import { OPERATORS_FIELDNAME } from '../filterOperators'; -import GraphQLMongoID from '../../../types/mongoid'; import { UserModel } from '../../../__mocks__/userModel'; import { convertModelToGraphQL } from '../../../fieldsConverter'; @@ -41,17 +45,17 @@ describe('Resolver helper `filter` ->', () => { const args: any = filterHelperArgs(UserTC, UserModel, { filterTypeName: 'FilterUserType', }); - expect(args.filter.type).toBeInstanceOf(GraphQLInputObjectType); + expect(args.filter.type).toBeInstanceOf(InputTypeComposer); }); it('should return filter with field _ids', () => { const args: any = filterHelperArgs(UserTC, UserModel, { filterTypeName: 'FilterUserType', }); - const itc = schemaComposer.createInputTC(args.filter.type); - const ft: any = itc.getFieldType('_ids'); - expect(ft).toBeInstanceOf(GraphQLList); - expect(ft.ofType).toBe(GraphQLMongoID); + const itc = args.filter.type; + const ft = itc.getField('_ids').type; + expect(ft).toBeInstanceOf(ListComposer); + expect(ft.ofType.getTypeName()).toBe('MongoID'); }); it('should for opts.isRequired=true return GraphQLNonNull', () => { @@ -59,7 +63,7 @@ describe('Resolver helper `filter` ->', () => { filterTypeName: 'FilterUserType', isRequired: true, }); - expect(args.filter.type).toBeInstanceOf(GraphQLNonNull); + expect(args.filter.type).toBeInstanceOf(NonNullComposer); }); it('should remove fields via opts.removeFields', () => { @@ -67,7 +71,7 @@ describe('Resolver helper `filter` ->', () => { filterTypeName: 'FilterUserType', removeFields: ['name', 'age'], }); - const itc = schemaComposer.createInputTC(args.filter.type); + const itc = args.filter.type; expect(itc.hasField('name')).toBe(false); expect(itc.hasField('age')).toBe(false); expect(itc.hasField('gender')).toBe(true); @@ -78,10 +82,10 @@ describe('Resolver helper `filter` ->', () => { filterTypeName: 'FilterUserType', requiredFields: ['name', 'age'], }); - const itc = schemaComposer.createInputTC(args.filter.type); - expect(itc.getFieldType('name')).toBeInstanceOf(GraphQLNonNull); - expect(itc.getFieldType('age')).toBeInstanceOf(GraphQLNonNull); - expect(itc.getFieldType('gender')).not.toBeInstanceOf(GraphQLNonNull); + const itc = args.filter.type; + expect(itc.getField('name').type).toBeInstanceOf(NonNullComposer); + expect(itc.getField('age').type).toBeInstanceOf(NonNullComposer); + expect(itc.getField('gender').type).not.toBeInstanceOf(NonNullComposer); }); it('should leave only indexed fields if opts.onlyIndexed=true', () => { @@ -90,7 +94,7 @@ describe('Resolver helper `filter` ->', () => { onlyIndexed: true, model: UserModel, }); - const itc = schemaComposer.createInputTC(args.filter.type); + const itc = args.filter.type; expect(itc.hasField('_id')).toBe(true); expect(itc.hasField('name')).toBe(true); expect(itc.hasField('age')).toBe(false); @@ -104,7 +108,7 @@ describe('Resolver helper `filter` ->', () => { model: UserModel, removeFields: ['name'], }); - const itc = schemaComposer.createInputTC(args.filter.type); + const itc = args.filter.type; expect(itc.hasField('_id')).toBe(true); expect(itc.hasField('name')).toBe(false); expect(itc.hasField('age')).toBe(false); diff --git a/src/resolvers/helpers/__tests__/record-test.js b/src/resolvers/helpers/__tests__/record-test.js index c998ed2e..8bbc0b90 100644 --- a/src/resolvers/helpers/__tests__/record-test.js +++ b/src/resolvers/helpers/__tests__/record-test.js @@ -1,7 +1,11 @@ /* @flow */ -import { schemaComposer, type ObjectTypeComposer } from 'graphql-compose'; -import { GraphQLInputObjectType, GraphQLNonNull } from 'graphql-compose/lib/graphql'; +import { + schemaComposer, + NonNullComposer, + InputTypeComposer, + type ObjectTypeComposer, +} from 'graphql-compose'; import { recordHelperArgs } from '../record'; import { UserModel } from '../../../__mocks__/userModel'; import { convertModelToGraphQL } from '../../../fieldsConverter'; @@ -23,7 +27,7 @@ describe('Resolver helper `record` ->', () => { const args: any = recordHelperArgs(UserTC, { recordTypeName: 'RecordUserType', }); - expect(args.record.type).toBeInstanceOf(GraphQLInputObjectType); + expect(args.record.type).toBeInstanceOf(InputTypeComposer); }); it('should reuse existed inputType', () => { @@ -35,15 +39,15 @@ describe('Resolver helper `record` ->', () => { const args: any = recordHelperArgs(UserTC, { recordTypeName: 'RecordUserType', }); - expect(args.record.type).toBe(existedType.getType()); + expect(args.record.type).toBe(existedType); }); - it('should for opts.isRequired=true return GraphQLNonNull', () => { + it('should for opts.isRequired=true return NonNullComposer', () => { const args: any = recordHelperArgs(UserTC, { recordTypeName: 'RecordUserType', isRequired: true, }); - expect(args.record.type).toBeInstanceOf(GraphQLNonNull); + expect(args.record.type).toBeInstanceOf(NonNullComposer); }); it('should remove fields via opts.removeFields', () => { @@ -51,7 +55,7 @@ describe('Resolver helper `record` ->', () => { recordTypeName: 'RecordUserType', removeFields: ['name', 'age'], }); - const inputTypeComposer = schemaComposer.createInputTC(args.record.type); + const inputTypeComposer = args.record.type; expect(inputTypeComposer.hasField('name')).toBe(false); expect(inputTypeComposer.hasField('age')).toBe(false); expect(inputTypeComposer.hasField('gender')).toBe(true); @@ -62,10 +66,10 @@ describe('Resolver helper `record` ->', () => { recordTypeName: 'RecordUserType', requiredFields: ['name', 'age'], }); - const inputTypeComposer = schemaComposer.createInputTC(args.record.type); - expect(inputTypeComposer.getFieldType('name')).toBeInstanceOf(GraphQLNonNull); - expect(inputTypeComposer.getFieldType('age')).toBeInstanceOf(GraphQLNonNull); - expect(inputTypeComposer.getFieldType('gender')).not.toBeInstanceOf(GraphQLNonNull); + const inputTypeComposer = args.record.type; + expect(inputTypeComposer.getField('name').type).toBeInstanceOf(NonNullComposer); + expect(inputTypeComposer.getField('age').type).toBeInstanceOf(NonNullComposer); + expect(inputTypeComposer.getField('gender').type).not.toBeInstanceOf(NonNullComposer); }); }); }); diff --git a/src/resolvers/helpers/filter.d.ts b/src/resolvers/helpers/filter.d.ts index 007591fc..c75f470d 100644 --- a/src/resolvers/helpers/filter.d.ts +++ b/src/resolvers/helpers/filter.d.ts @@ -1,4 +1,7 @@ -import { ComposeFieldConfigArgumentMap, ObjectTypeComposer } from 'graphql-compose'; +import { + ObjectTypeComposerArgumentConfigMapDefinition, + ObjectTypeComposer, +} from 'graphql-compose'; import { Model } from 'mongoose'; import { MongoId } from '../../types/mongoid'; import { ExtendedResolveParams } from '../index'; @@ -29,6 +32,6 @@ export function filterHelperArgs( typeComposer: ObjectTypeComposer, model: Model, opts?: FilterHelperArgsOpts, -): ComposeFieldConfigArgumentMap; +): ObjectTypeComposerArgumentConfigMapDefinition; export function filterHelper(resolveParams: ExtendedResolveParams): void; diff --git a/src/resolvers/helpers/filter.js b/src/resolvers/helpers/filter.js index b2969fe1..61f1c6d3 100644 --- a/src/resolvers/helpers/filter.js +++ b/src/resolvers/helpers/filter.js @@ -1,7 +1,10 @@ /* @flow */ /* eslint-disable no-use-before-define */ -import type { ObjectTypeComposer, ComposeFieldConfigArgumentMap } from 'graphql-compose'; +import { + ObjectTypeComposer, + type ObjectTypeComposerArgumentConfigMapDefinition, +} from 'graphql-compose'; import type { MongooseModel } from 'mongoose'; import GraphQLMongoID from '../../types/mongoid'; import { isObject, toMongoFilterDottedObject, getIndexedFieldNamesForGraphQL } from '../../utils'; @@ -35,8 +38,8 @@ export const filterHelperArgs = ( typeComposer: ObjectTypeComposer, model: MongooseModel, opts?: FilterHelperArgsOpts -): ComposeFieldConfigArgumentMap<> => { - if (!typeComposer || typeComposer.constructor.name !== 'ObjectTypeComposer') { +): ObjectTypeComposerArgumentConfigMapDefinition<> => { + if (!(typeComposer instanceof ObjectTypeComposer)) { throw new Error('First arg for filterHelperArgs() should be instance of ObjectTypeComposer.'); } @@ -69,7 +72,7 @@ export const filterHelperArgs = ( const filterTypeName: string = opts.filterTypeName; const itc = typeComposer.getInputTypeComposer().clone(filterTypeName); - itc.makeOptional('_id'); + itc.makeFieldNullable('_id'); itc.addFields({ _ids: [GraphQLMongoID], @@ -78,7 +81,7 @@ export const filterHelperArgs = ( itc.removeField(removeFields); if (opts.requiredFields) { - itc.makeRequired(opts.requiredFields); + itc.makeFieldNonNull(opts.requiredFields); } if (itc.getFieldNames().length === 0) { @@ -89,7 +92,7 @@ export const filterHelperArgs = ( return { filter: { - type: opts.isRequired ? itc.getTypeNonNull() : itc.getType(), + type: opts.isRequired ? itc.getTypeNonNull() : itc, description: opts.onlyIndexed ? 'Filter only by indexed fields' : 'Filter by fields', }, }; diff --git a/src/resolvers/helpers/limit.d.ts b/src/resolvers/helpers/limit.d.ts index 1c4c1d76..b918aff9 100644 --- a/src/resolvers/helpers/limit.d.ts +++ b/src/resolvers/helpers/limit.d.ts @@ -1,4 +1,4 @@ -import { ComposeFieldConfigArgumentMap } from 'graphql-compose'; +import { ObjectTypeComposerArgumentConfigMapDefinition } from 'graphql-compose'; import { ExtendedResolveParams } from '../index'; export type LimitHelperArgsOpts = { @@ -13,6 +13,6 @@ export function getLimitHelperArgsOptsMap(): Partial< export function limitHelperArgs( opts?: LimitHelperArgsOpts, -): ComposeFieldConfigArgumentMap; +): ObjectTypeComposerArgumentConfigMapDefinition; export function limitHelper(resolveParams: ExtendedResolveParams): void; diff --git a/src/resolvers/helpers/limit.js b/src/resolvers/helpers/limit.js index 3b160452..bd2ddf02 100644 --- a/src/resolvers/helpers/limit.js +++ b/src/resolvers/helpers/limit.js @@ -1,6 +1,6 @@ /* @flow */ -import type { ComposeFieldConfigArgumentMap } from 'graphql-compose'; +import type { ObjectTypeComposerArgumentConfigMapDefinition } from 'graphql-compose'; import type { ExtendedResolveParams } from '../index'; export type LimitHelperArgsOpts = { @@ -10,7 +10,9 @@ export type LimitHelperArgsOpts = { // for merging, discriminators merge-able only export const getLimitHelperArgsOptsMap = () => ({ defaultValue: 'number' }); -export const limitHelperArgs = (opts?: LimitHelperArgsOpts): ComposeFieldConfigArgumentMap<> => { +export const limitHelperArgs = ( + opts?: LimitHelperArgsOpts +): ObjectTypeComposerArgumentConfigMapDefinition<> => { return { limit: { type: 'Int', diff --git a/src/resolvers/helpers/record.d.ts b/src/resolvers/helpers/record.d.ts index 901f8c81..c609107f 100644 --- a/src/resolvers/helpers/record.d.ts +++ b/src/resolvers/helpers/record.d.ts @@ -1,4 +1,4 @@ -import { ComposeFieldConfigArgumentMap, ObjectTypeComposer } from 'graphql-compose'; +import { ObjectTypeComposerArgumentConfigMapDefinition, ObjectTypeComposer } from 'graphql-compose'; export type RecordHelperArgsOpts = { recordTypeName?: string; @@ -17,4 +17,4 @@ export type RecordsHelperArgs = { records: TSource[] }; export function recordHelperArgs( tc: ObjectTypeComposer, opts?: RecordHelperArgsOpts, -): ComposeFieldConfigArgumentMap; +): ObjectTypeComposerArgumentConfigMapDefinition; diff --git a/src/resolvers/helpers/record.js b/src/resolvers/helpers/record.js index 39fbbe7d..4d57b9a9 100644 --- a/src/resolvers/helpers/record.js +++ b/src/resolvers/helpers/record.js @@ -2,7 +2,7 @@ import { type ObjectTypeComposer, - type ComposeFieldConfigArgumentMap, + type ObjectTypeComposerArgumentConfigMapDefinition, InputTypeComposer, } from 'graphql-compose'; @@ -23,7 +23,7 @@ export const getRecordHelperArgsOptsMap = () => ({ export const recordHelperArgs = ( tc: ObjectTypeComposer, opts?: RecordHelperArgsOpts -): ComposeFieldConfigArgumentMap<> => { +): ObjectTypeComposerArgumentConfigMapDefinition<> => { if (!tc || tc.constructor.name !== 'ObjectTypeComposer') { throw new Error('First arg for recordHelperArgs() should be instance of ObjectTypeComposer.'); } @@ -52,7 +52,7 @@ export const recordHelperArgs = ( return { record: { - type: opts.isRequired ? recordITC.getTypeNonNull() : recordITC.getType(), + type: opts.isRequired ? recordITC.getTypeNonNull() : recordITC, }, }; }; diff --git a/src/resolvers/helpers/skip.d.ts b/src/resolvers/helpers/skip.d.ts index fbc0edb0..c40bece1 100644 --- a/src/resolvers/helpers/skip.d.ts +++ b/src/resolvers/helpers/skip.d.ts @@ -1,8 +1,8 @@ -import { ComposeFieldConfigArgumentMap } from 'graphql-compose'; +import { ObjectTypeComposerArgumentConfigMapDefinition } from 'graphql-compose'; import { ExtendedResolveParams } from '../index'; export type SkipHelperArgs = number; -export function skipHelperArgs(): ComposeFieldConfigArgumentMap; +export function skipHelperArgs(): ObjectTypeComposerArgumentConfigMapDefinition; export function skipHelper(resolveParams: ExtendedResolveParams): void; diff --git a/src/resolvers/helpers/skip.js b/src/resolvers/helpers/skip.js index 7c83c935..43a49ad7 100644 --- a/src/resolvers/helpers/skip.js +++ b/src/resolvers/helpers/skip.js @@ -1,9 +1,9 @@ /* @flow */ -import type { ComposeFieldConfigArgumentMap } from 'graphql-compose'; +import type { ObjectTypeComposerArgumentConfigMapDefinition } from 'graphql-compose'; import type { ExtendedResolveParams } from '../index'; -export const skipHelperArgs = (): ComposeFieldConfigArgumentMap<> => { +export const skipHelperArgs = (): ObjectTypeComposerArgumentConfigMapDefinition<> => { return { skip: { type: 'Int', diff --git a/src/resolvers/helpers/sort.d.ts b/src/resolvers/helpers/sort.d.ts index 2b7babbc..71328e64 100644 --- a/src/resolvers/helpers/sort.d.ts +++ b/src/resolvers/helpers/sort.d.ts @@ -1,5 +1,5 @@ import { - ComposeFieldConfigArgumentMap, + ObjectTypeComposerArgumentConfigMapDefinition, EnumTypeComposer, SchemaComposer, ObjectTypeComposer, @@ -17,7 +17,7 @@ export function sortHelperArgs( typeComposer: ObjectTypeComposer, model: Model, opts?: SortHelperArgsOpts, -): ComposeFieldConfigArgumentMap; +): ObjectTypeComposerArgumentConfigMapDefinition; export function sortHelper(resolveParams: ExtendedResolveParams): void; diff --git a/src/resolvers/helpers/sort.js b/src/resolvers/helpers/sort.js index 9bcdef62..37808407 100644 --- a/src/resolvers/helpers/sort.js +++ b/src/resolvers/helpers/sort.js @@ -3,7 +3,7 @@ import type { MongooseModel } from 'mongoose'; import type { - ComposeFieldConfigArgumentMap, + ObjectTypeComposerArgumentConfigMapDefinition, ObjectTypeComposer, SchemaComposer, EnumTypeComposer, @@ -19,7 +19,7 @@ export const sortHelperArgs = ( tc: ObjectTypeComposer, model: MongooseModel, opts?: SortHelperArgsOpts -): ComposeFieldConfigArgumentMap<> => { +): ObjectTypeComposerArgumentConfigMapDefinition<> => { if (!tc || tc.constructor.name !== 'ObjectTypeComposer') { throw new Error('First arg for sortHelperArgs() should be instance of ObjectTypeComposer.'); } diff --git a/src/resolvers/index.d.ts b/src/resolvers/index.d.ts index 9195cd9f..12c37ee1 100644 --- a/src/resolvers/index.d.ts +++ b/src/resolvers/index.d.ts @@ -1,4 +1,4 @@ -import { ResolveParams } from 'graphql-compose'; +import { ResolverResolveParams } from 'graphql-compose'; import { DocumentQuery } from 'mongoose'; import connection from './connection'; import count from './count'; @@ -36,7 +36,7 @@ export type GenResolverOpts = { limit?: LimitHelperArgsOpts; }; -export type ExtendedResolveParams = ResolveParams & { +export type ExtendedResolveParams = ResolverResolveParams & { query: DocumentQuery; rawQuery: { [optName: string]: any }; beforeQuery?: (query: any, rp: ExtendedResolveParams) => Promise; diff --git a/src/resolvers/index.js b/src/resolvers/index.js index 9eecaa94..421b11a2 100644 --- a/src/resolvers/index.js +++ b/src/resolvers/index.js @@ -1,6 +1,6 @@ /* @flow */ -import type { ResolveParams } from 'graphql-compose'; +import type { ResolverResolveParams } from 'graphql-compose'; import type { MongooseQuery } from 'mongoose'; import connection from './connection'; import count from './count'; @@ -38,7 +38,7 @@ export type GenResolverOpts = { limit?: LimitHelperArgsOpts, }; -export type ExtendedResolveParams = $Shape> & { +export type ExtendedResolveParams = $Shape> & { query: MongooseQuery<*, *>, rawQuery: { [optName: string]: any }, beforeQuery?: (query: mixed, rp: ExtendedResolveParams) => Promise<*>, diff --git a/src/resolvers/updateById.js b/src/resolvers/updateById.js index 2f1e9bbb..f214c82f 100644 --- a/src/resolvers/updateById.js +++ b/src/resolvers/updateById.js @@ -33,7 +33,7 @@ export default function updateById( description: 'Updated document ID', }, record: { - type: tc.getType(), + type: tc, description: 'Updated document', }, }); diff --git a/src/resolvers/updateOne.js b/src/resolvers/updateOne.js index adeb6ceb..64d31905 100644 --- a/src/resolvers/updateOne.js +++ b/src/resolvers/updateOne.js @@ -31,7 +31,7 @@ export default function updateOne( description: 'Updated document ID', }, record: { - type: tc.getType(), + type: tc, description: 'Updated document', }, }); diff --git a/yarn.lock b/yarn.lock index 4512304e..a2e09ba5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@babel/cli@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.4.3.tgz#353048551306ff42e5855b788b6ccd9477289774" - integrity sha512-cbC5H9iTDV9H7sMxK5rUm18UbdVPNTPqgdzmQAkOUP3YLysgDWLZaysVAfylK49rgTlzL01a6tXyq9rCb3yLhQ== +"@babel/cli@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.4.4.tgz#5454bb7112f29026a4069d8e6f0e1794e651966c" + integrity sha512-XGr5YjQSjgTa6OzQZY57FAJsdeVSAKR/u/KA5exWIz66IKtv/zXtHy+fIZcMry/EgYegwuHE7vzGnrFhjdIAsQ== dependencies: commander "^2.8.1" convert-source-map "^1.1.0" @@ -45,18 +45,18 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.3.tgz#198d6d3af4567be3989550d97e068de94503074f" - integrity sha512-oDpASqKFlbspQfzAE7yaeTmdljSH2ADIvBlb0RwbStltTuWa0+7CCI1fYVINNv9saHPa1W7oaKeuNuKj+RQCvA== +"@babel/core@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.4.tgz#84055750b05fcd50f9915a826b44fa347a825250" + integrity sha512-lQgGX3FPRgbz2SKmhMtYgJvVzGZrmjaF4apZ2bLwofAKiSjxU0drPh4S/VasyYXwaTs+A1gvQ45BN8SQJzHsQQ== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.4.0" - "@babel/helpers" "^7.4.3" - "@babel/parser" "^7.4.3" - "@babel/template" "^7.4.0" - "@babel/traverse" "^7.4.3" - "@babel/types" "^7.4.0" + "@babel/generator" "^7.4.4" + "@babel/helpers" "^7.4.4" + "@babel/parser" "^7.4.4" + "@babel/template" "^7.4.4" + "@babel/traverse" "^7.4.4" + "@babel/types" "^7.4.4" convert-source-map "^1.1.0" debug "^4.1.0" json5 "^2.1.0" @@ -107,12 +107,12 @@ source-map "^0.5.0" trim-right "^1.0.1" -"@babel/generator@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.4.0.tgz#c230e79589ae7a729fd4631b9ded4dc220418196" - integrity sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ== +"@babel/generator@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.4.4.tgz#174a215eb843fc392c7edcaabeaa873de6e8f041" + integrity sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ== dependencies: - "@babel/types" "^7.4.0" + "@babel/types" "^7.4.4" jsesc "^2.5.1" lodash "^4.17.11" source-map "^0.5.0" @@ -131,34 +131,34 @@ "@babel/helper-explode-assignable-expression" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-call-delegate@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.4.0.tgz#f308eabe0d44f451217853aedf4dea5f6fe3294f" - integrity sha512-SdqDfbVdNQCBp3WhK2mNdDvHd3BD6qbmIc43CAyjnsfCmgHMeqgDcM3BzY2lchi7HBJGJ2CVdynLWbezaE4mmQ== +"@babel/helper-call-delegate@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz#87c1f8ca19ad552a736a7a27b1c1fcf8b1ff1f43" + integrity sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ== dependencies: - "@babel/helper-hoist-variables" "^7.4.0" - "@babel/traverse" "^7.4.0" - "@babel/types" "^7.4.0" + "@babel/helper-hoist-variables" "^7.4.4" + "@babel/traverse" "^7.4.4" + "@babel/types" "^7.4.4" -"@babel/helper-create-class-features-plugin@^7.4.0": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.3.tgz#5bbd279c6c3ac6a60266b89bbfe7f8021080a1ef" - integrity sha512-UMl3TSpX11PuODYdWGrUeW6zFkdYhDn7wRLrOuNVM6f9L+S9CzmDXYyrp3MTHcwWjnzur1f/Op8A7iYZWya2Yg== +"@babel/helper-create-class-features-plugin@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.4.tgz#fc3d690af6554cc9efc607364a82d48f58736dba" + integrity sha512-UbBHIa2qeAGgyiNR9RszVF7bUHEdgS4JAUNT8SiqrAN6YJVxlOxeLr5pBzb5kan302dejJ9nla4RyKcR1XT6XA== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-member-expression-to-functions" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.4.0" - "@babel/helper-split-export-declaration" "^7.4.0" + "@babel/helper-replace-supers" "^7.4.4" + "@babel/helper-split-export-declaration" "^7.4.4" -"@babel/helper-define-map@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.4.0.tgz#cbfd8c1b2f12708e262c26f600cd16ed6a3bc6c9" - integrity sha512-wAhQ9HdnLIywERVcSvX40CEJwKdAa1ID4neI9NXQPDOHwwA+57DqwLiPEVy2AIyWzAk0CQ8qx4awO0VUURwLtA== +"@babel/helper-define-map@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz#6969d1f570b46bdc900d1eba8e5d59c48ba2c12a" + integrity sha512-IX3Ln8gLhZpSuqHJSnTNBWGDE9kdkTEWl21A/K7PQ00tseBwbqCHTvNLHSBd9M0R5rER4h5Rsvj9vw0R5SieBg== dependencies: "@babel/helper-function-name" "^7.1.0" - "@babel/types" "^7.4.0" + "@babel/types" "^7.4.4" lodash "^4.17.11" "@babel/helper-explode-assignable-expression@^7.1.0": @@ -190,12 +190,12 @@ dependencies: "@babel/types" "^7.0.0" -"@babel/helper-hoist-variables@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.0.tgz#25b621399ae229869329730a62015bbeb0a6fbd6" - integrity sha512-/NErCuoe/et17IlAQFKWM24qtyYYie7sFIrW/tIQXpck6vAu2hhtYYsKLBWQV+BQZMbcIYPU/QMYuTufrY4aQw== +"@babel/helper-hoist-variables@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz#0298b5f25c8c09c53102d52ac4a98f773eb2850a" + integrity sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w== dependencies: - "@babel/types" "^7.4.0" + "@babel/types" "^7.4.4" "@babel/helper-member-expression-to-functions@^7.0.0": version "7.0.0" @@ -220,16 +220,16 @@ "@babel/types" "^7.0.0" lodash "^4.17.10" -"@babel/helper-module-transforms@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.4.3.tgz#b1e357a1c49e58a47211a6853abb8e2aaefeb064" - integrity sha512-H88T9IySZW25anu5uqyaC1DaQre7ofM+joZtAaO2F8NBdFfupH0SZ4gKjgSFVcvtx/aAirqA9L9Clio2heYbZA== +"@babel/helper-module-transforms@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz#96115ea42a2f139e619e98ed46df6019b94414b8" + integrity sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/template" "^7.2.2" - "@babel/types" "^7.2.2" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/template" "^7.4.4" + "@babel/types" "^7.4.4" lodash "^4.17.11" "@babel/helper-optimise-call-expression@^7.0.0": @@ -248,10 +248,10 @@ dependencies: lodash "^4.17.10" -"@babel/helper-regex@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.4.3.tgz#9d6e5428bfd638ab53b37ae4ec8caf0477495147" - integrity sha512-hnoq5u96pLCfgjXuj8ZLX3QQ+6nAulS+zSgi6HulUwFbEruRAKwbGLU5OvXkE14L8XW6XsQEKsIDfgthKLRAyA== +"@babel/helper-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.4.4.tgz#a47e02bc91fb259d2e6727c2a30013e3ac13c4a2" + integrity sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q== dependencies: lodash "^4.17.11" @@ -274,15 +274,15 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-replace-supers@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.4.0.tgz#4f56adb6aedcd449d2da9399c2dcf0545463b64c" - integrity sha512-PVwCVnWWAgnal+kJ+ZSAphzyl58XrFeSKSAJRiqg5QToTsjL+Xu1f9+RJ+d+Q0aPhPfBGaYfkox66k86thxNSg== +"@babel/helper-replace-supers@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz#aee41783ebe4f2d3ab3ae775e1cc6f1a90cefa27" + integrity sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg== dependencies: "@babel/helper-member-expression-to-functions" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.4.0" - "@babel/types" "^7.4.0" + "@babel/traverse" "^7.4.4" + "@babel/types" "^7.4.4" "@babel/helper-simple-access@^7.1.0": version "7.1.0" @@ -297,12 +297,12 @@ dependencies: "@babel/types" "^7.0.0" -"@babel/helper-split-export-declaration@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz#571bfd52701f492920d63b7f735030e9a3e10b55" - integrity sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw== +"@babel/helper-split-export-declaration@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677" + integrity sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q== dependencies: - "@babel/types" "^7.4.0" + "@babel/types" "^7.4.4" "@babel/helper-wrap-function@^7.1.0": version "7.1.0" @@ -322,14 +322,14 @@ "@babel/traverse" "^7.1.5" "@babel/types" "^7.2.0" -"@babel/helpers@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.4.3.tgz#7b1d354363494b31cb9a2417ae86af32b7853a3b" - integrity sha512-BMh7X0oZqb36CfyhvtbSmcWc3GXocfxv3yNsAEuM0l+fAqSO22rQrUpijr3oE/10jCTrB6/0b9kzmG4VetCj8Q== +"@babel/helpers@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.4.4.tgz#868b0ef59c1dd4e78744562d5ce1b59c89f2f2a5" + integrity sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A== dependencies: - "@babel/template" "^7.4.0" - "@babel/traverse" "^7.4.3" - "@babel/types" "^7.4.0" + "@babel/template" "^7.4.4" + "@babel/traverse" "^7.4.4" + "@babel/types" "^7.4.4" "@babel/highlight@^7.0.0": version "7.0.0" @@ -357,10 +357,10 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.3.tgz#32f5df65744b70888d17872ec106b02434ba1489" integrity sha512-0LyEcVlfCoFmci8mXx8A5oIkpkOgyo8dRHtxBnK9RRBwxO2+JZPNsqtVEZQ7mJFPxnXF9lfmU24mHOPI0qnlkA== -"@babel/parser@^7.4.0", "@babel/parser@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.4.3.tgz#eb3ac80f64aa101c907d4ce5406360fe75b7895b" - integrity sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ== +"@babel/parser@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.4.4.tgz#5977129431b8fe33471730d255ce8654ae1250b6" + integrity sha512-5pCS4mOsL+ANsFZGdvNLybx4wtqAZJ0MJjMHxvzI3bvIsz6sQvzW8XX92EYIkiPtIvcfG3Aj+Ir5VNyjnZhP7w== "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.2.0" @@ -371,12 +371,12 @@ "@babel/helper-remap-async-to-generator" "^7.1.0" "@babel/plugin-syntax-async-generators" "^7.2.0" -"@babel/plugin-proposal-class-properties@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.4.0.tgz#d70db61a2f1fd79de927eea91f6411c964e084b8" - integrity sha512-t2ECPNOXsIeK1JxJNKmgbzQtoG27KIlVE61vTqX0DKR9E9sZlVVxWUtEW9D5FlZ8b8j7SBNCHY47GgPKCKlpPg== +"@babel/plugin-proposal-class-properties@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.4.4.tgz#93a6486eed86d53452ab9bab35e368e9461198ce" + integrity sha512-WjKTI8g8d5w1Bc9zgwSz2nfrsNQsXcCf9J9cdCvrJV6RF56yztwm4TmJC0MgJ9tvwO9gUA/mcYe89bLdGfiXFg== dependencies: - "@babel/helper-create-class-features-plugin" "^7.4.0" + "@babel/helper-create-class-features-plugin" "^7.4.4" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-json-strings@^7.2.0": @@ -387,10 +387,10 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-json-strings" "^7.2.0" -"@babel/plugin-proposal-object-rest-spread@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.3.tgz#be27cd416eceeba84141305b93c282f5de23bbb4" - integrity sha512-xC//6DNSSHVjq8O2ge0dyYlhshsH4T7XdCVoxbi5HzLYWfsC5ooFlJjrXk8RcAT+hjHAK9UjBXdylzSoDK3t4g== +"@babel/plugin-proposal-object-rest-spread@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.4.tgz#1ef173fcf24b3e2df92a678f027673b55e7e3005" + integrity sha512-dMBG6cSPBbHeEBdFXeQ2QLc5gUpg4Vkaz8octD4aoW/ISO+jBOcsuxYL7bsb5WSu8RLP6boxrBIALEHgoHtO9g== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" @@ -403,13 +403,13 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" -"@babel/plugin-proposal-unicode-property-regex@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.0.tgz#202d91ee977d760ef83f4f416b280d568be84623" - integrity sha512-h/KjEZ3nK9wv1P1FSNb9G079jXrNYR0Ko+7XkOx85+gM24iZbPn0rh4vCftk+5QKY7y1uByFataBTmX7irEF1w== +"@babel/plugin-proposal-unicode-property-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz#501ffd9826c0b91da22690720722ac7cb1ca9c78" + integrity sha512-j1NwnOqMG9mFUOH58JTFsA/+ZYzQLUZ/drqWUqxCYLGeu2JFZL8YrNC9hBxKmWtAuOCHPcRpgv7fhap09Fb4kA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" + "@babel/helper-regex" "^7.4.4" regexpu-core "^4.5.4" "@babel/plugin-syntax-async-generators@^7.2.0": @@ -460,10 +460,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-async-to-generator@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.0.tgz#234fe3e458dce95865c0d152d256119b237834b0" - integrity sha512-EeaFdCeUULM+GPFEsf7pFcNSxM7hYjoj5fiYbyuiXobW4JhFnjAv9OWzNwHyHcKoPNpAfeRDuW6VyaXEDUBa7g== +"@babel/plugin-transform-async-to-generator@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.4.tgz#a3f1d01f2f21cadab20b33a82133116f14fb5894" + integrity sha512-YiqW2Li8TXmzgbXw+STsSqPBPFnGviiaSp6CYOq55X8GQ2SGVLrXB6pNid8HkqkZAzOH6knbai3snhP7v0fNwA== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -476,26 +476,26 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-block-scoping@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.0.tgz#164df3bb41e3deb954c4ca32ffa9fcaa56d30bcb" - integrity sha512-AWyt3k+fBXQqt2qb9r97tn3iBwFpiv9xdAiG+Gr2HpAZpuayvbL55yWrsV3MyHvXk/4vmSiedhDRl1YI2Iy5nQ== +"@babel/plugin-transform-block-scoping@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz#c13279fabf6b916661531841a23c4b7dae29646d" + integrity sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.11" -"@babel/plugin-transform-classes@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.3.tgz#adc7a1137ab4287a555d429cc56ecde8f40c062c" - integrity sha512-PUaIKyFUDtG6jF5DUJOfkBdwAS/kFFV3XFk7Nn0a6vR7ZT8jYw5cGtIlat77wcnd0C6ViGqo/wyNf4ZHytF/nQ== +"@babel/plugin-transform-classes@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz#0ce4094cdafd709721076d3b9c38ad31ca715eb6" + integrity sha512-/e44eFLImEGIpL9qPxSRat13I5QNRgBLu2hOQJCF7VLy/otSM/sypV1+XaIw5+502RX/+6YaSAPmldk+nhHDPw== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-define-map" "^7.4.0" + "@babel/helper-define-map" "^7.4.4" "@babel/helper-function-name" "^7.1.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.4.0" - "@babel/helper-split-export-declaration" "^7.4.0" + "@babel/helper-replace-supers" "^7.4.4" + "@babel/helper-split-export-declaration" "^7.4.4" globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.2.0": @@ -505,20 +505,20 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-destructuring@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.3.tgz#1a95f5ca2bf2f91ef0648d5de38a8d472da4350f" - integrity sha512-rVTLLZpydDFDyN4qnXdzwoVpk1oaXHIvPEOkOLyr88o7oHxVc/LyrnDx+amuBWGOwUb7D1s/uLsKBNTx08htZg== +"@babel/plugin-transform-destructuring@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.4.tgz#9d964717829cc9e4b601fc82a26a71a4d8faf20f" + integrity sha512-/aOx+nW0w8eHiEHm+BTERB2oJn5D127iye/SUQl7NjHy0lf+j7h4MKMMSOwdazGq9OxgiNADncE+SRJkCxjZpQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-dotall-regex@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.3.tgz#fceff1c16d00c53d32d980448606f812cd6d02bf" - integrity sha512-9Arc2I0AGynzXRR/oPdSALv3k0rM38IMFyto7kOCwb5F9sLUt2Ykdo3V9yUPR+Bgr4kb6bVEyLkPEiBhzcTeoA== +"@babel/plugin-transform-dotall-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.4.tgz#361a148bc951444312c69446d76ed1ea8e4450c3" + integrity sha512-P05YEhRc2h53lZDjRPk/OektxCVevFzZs2Gfjd545Wde3k+yFDbXORgl2e0xpbq8mLcKJ7Idss4fAg0zORN/zg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.4.3" + "@babel/helper-regex" "^7.4.4" regexpu-core "^4.5.4" "@babel/plugin-transform-duplicate-keys@^7.2.0": @@ -543,25 +543,25 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-flow" "^7.0.0" -"@babel/plugin-transform-flow-strip-types@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.4.0.tgz#f3c59eecff68c99b9c96eaafe4fe9d1fa8947138" - integrity sha512-C4ZVNejHnfB22vI2TYN4RUp2oCmq6cSEAg4RygSvYZUECRqUu9O4PMEMNJ4wsemaRGg27BbgYctG4BZh+AgIHw== +"@babel/plugin-transform-flow-strip-types@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.4.4.tgz#d267a081f49a8705fc9146de0768c6b58dccd8f7" + integrity sha512-WyVedfeEIILYEaWGAUWzVNyqG4sfsNooMhXWsu/YzOvVGcsnPb5PguysjJqI3t3qiaYj0BR8T2f5njdjTGe44Q== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-flow" "^7.2.0" -"@babel/plugin-transform-for-of@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.3.tgz#c36ff40d893f2b8352202a2558824f70cd75e9fe" - integrity sha512-UselcZPwVWNSURnqcfpnxtMehrb8wjXYOimlYQPBnup/Zld426YzIhNEvuRsEWVHfESIECGrxoI6L5QqzuLH5Q== +"@babel/plugin-transform-for-of@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz#0267fc735e24c808ba173866c6c4d1440fc3c556" + integrity sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-function-name@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.3.tgz#130c27ec7fb4f0cba30e958989449e5ec8d22bbd" - integrity sha512-uT5J/3qI/8vACBR9I1GlAuU/JqBtWdfCrynuOkrWG6nCDieZd5przB1vfP59FRHBZQ9DC2IUfqr/xKqzOD5x0A== +"@babel/plugin-transform-function-name@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz#e1436116abb0610c2259094848754ac5230922ad" + integrity sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -588,21 +588,21 @@ "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-commonjs@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.3.tgz#3917f260463ac08f8896aa5bd54403f6e1fed165" - integrity sha512-sMP4JqOTbMJMimqsSZwYWsMjppD+KRyDIUVW91pd7td0dZKAvPmhCaxhOzkzLParKwgQc7bdL9UNv+rpJB0HfA== +"@babel/plugin-transform-modules-commonjs@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.4.tgz#0bef4713d30f1d78c2e59b3d6db40e60192cac1e" + integrity sha512-4sfBOJt58sEo9a2BQXnZq+Q3ZTSAUXyK3E30o36BOGnJ+tvJ6YSxF0PG6kERvbeISgProodWuI9UVG3/FMY6iw== dependencies: - "@babel/helper-module-transforms" "^7.4.3" + "@babel/helper-module-transforms" "^7.4.4" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" -"@babel/plugin-transform-modules-systemjs@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.0.tgz#c2495e55528135797bc816f5d50f851698c586a1" - integrity sha512-gjPdHmqiNhVoBqus5qK60mWPp1CmYWp/tkh11mvb0rrys01HycEGD7NvvSoKXlWEfSM9TcL36CpsK8ElsADptQ== +"@babel/plugin-transform-modules-systemjs@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.4.tgz#dc83c5665b07d6c2a7b224c00ac63659ea36a405" + integrity sha512-MSiModfILQc3/oqnG7NrP1jHaSPryO6tA2kOMmAQApz5dayPxWiHqmq4sWH2xF5LcQK56LlbKByCd8Aah/OIkQ== dependencies: - "@babel/helper-hoist-variables" "^7.4.0" + "@babel/helper-hoist-variables" "^7.4.4" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-modules-umd@^7.2.0": @@ -613,17 +613,17 @@ "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-named-capturing-groups-regex@^7.4.2": - version "7.4.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.2.tgz#800391136d6cbcc80728dbdba3c1c6e46f86c12e" - integrity sha512-NsAuliSwkL3WO2dzWTOL1oZJHm0TM8ZY8ZSxk2ANyKkt5SQlToGA4pzctmq1BEjoacurdwZ3xp2dCQWJkME0gQ== +"@babel/plugin-transform-named-capturing-groups-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.4.tgz#5611d96d987dfc4a3a81c4383bb173361037d68d" + integrity sha512-Ki+Y9nXBlKfhD+LXaRS7v95TtTGYRAf9Y1rTDiE75zf8YQz4GDaWRXosMfJBXxnk88mGFjWdCRIeqDbon7spYA== dependencies: regexp-tree "^0.1.0" -"@babel/plugin-transform-new-target@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.0.tgz#67658a1d944edb53c8d4fa3004473a0dd7838150" - integrity sha512-6ZKNgMQmQmrEX/ncuCwnnw1yVGoaOW5KpxNhoWI7pCQdA0uZ0HqHGqenCUIENAnxRjy2WwNQ30gfGdIgqJXXqw== +"@babel/plugin-transform-new-target@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz#18d120438b0cc9ee95a47f2c72bc9768fbed60a5" + integrity sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -635,12 +635,12 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.1.0" -"@babel/plugin-transform-parameters@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.3.tgz#e5ff62929fdf4cf93e58badb5e2430303003800d" - integrity sha512-ULJYC2Vnw96/zdotCZkMGr2QVfKpIT/4/K+xWWY0MbOJyMZuk660BGkr3bEKWQrrciwz6xpmft39nA4BF7hJuA== +"@babel/plugin-transform-parameters@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz#7556cf03f318bd2719fe4c922d2d808be5571e16" + integrity sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw== dependencies: - "@babel/helper-call-delegate" "^7.4.0" + "@babel/helper-call-delegate" "^7.4.4" "@babel/helper-get-function-arity" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -651,10 +651,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-regenerator@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.3.tgz#2a697af96887e2bbf5d303ab0221d139de5e739c" - integrity sha512-kEzotPuOpv6/iSlHroCDydPkKYw7tiJGKlmYp6iJn4a6C/+b2FdttlJsLKYxolYHgotTJ5G5UY5h0qey5ka3+A== +"@babel/plugin-transform-regenerator@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.4.tgz#5b4da4df79391895fca9e28f99e87e22cfc02072" + integrity sha512-Zz3w+pX1SI0KMIiqshFZkwnVGUhDZzpX2vtPzfJBKQQq8WsP/Xy9DNdELWivxcKOCX/Pywge4SiEaPaLtoDT4g== dependencies: regenerator-transform "^0.13.4" @@ -665,10 +665,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-runtime@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.3.tgz#4d6691690ecdc9f5cb8c3ab170a1576c1f556371" - integrity sha512-7Q61bU+uEI7bCUFReT1NKn7/X6sDQsZ7wL1sJ9IYMAO7cI+eg6x9re1cEw2fCRMbbTVyoeUKWSV1M6azEfKCfg== +"@babel/plugin-transform-runtime@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.4.tgz#a50f5d16e9c3a4ac18a1a9f9803c107c380bce08" + integrity sha512-aMVojEjPszvau3NRg+TIH14ynZLvPewH4xhlCW1w6A3rkxTS1m4uwzRclYR9oS+rl/dr+kT+pzbfHuAWP/lc7Q== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -697,10 +697,10 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" -"@babel/plugin-transform-template-literals@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz#d87ed01b8eaac7a92473f608c97c089de2ba1e5b" - integrity sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg== +"@babel/plugin-transform-template-literals@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz#9d28fea7bbce637fb7612a0750989d8321d4bcb0" + integrity sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -712,63 +712,63 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-unicode-regex@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.3.tgz#3868703fc0e8f443dda65654b298df576f7b863b" - integrity sha512-lnSNgkVjL8EMtnE8eSS7t2ku8qvKH3eqNf/IwIfnSPUqzgqYmRwzdsQWv4mNQAN9Nuo6Gz1Y0a4CSmdpu1Pp6g== +"@babel/plugin-transform-unicode-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz#ab4634bb4f14d36728bf5978322b35587787970f" + integrity sha512-il+/XdNw01i93+M9J9u4T7/e/Ue/vWfNZE4IRUQjplu2Mqb/AFTDimkw2tdEdSH50wuQXZAbXSql0UphQke+vA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.4.3" + "@babel/helper-regex" "^7.4.4" regexpu-core "^4.5.4" -"@babel/preset-env@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.4.3.tgz#e71e16e123dc0fbf65a52cbcbcefd072fbd02880" - integrity sha512-FYbZdV12yHdJU5Z70cEg0f6lvtpZ8jFSDakTm7WXeJbLXh4R0ztGEu/SW7G1nJ2ZvKwDhz8YrbA84eYyprmGqw== +"@babel/preset-env@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.4.4.tgz#b6f6825bfb27b3e1394ca3de4f926482722c1d6f" + integrity sha512-FU1H+ACWqZZqfw1x2G1tgtSSYSfxJLkpaUQL37CenULFARDo+h4xJoVHzRoHbK+85ViLciuI7ME4WTIhFRBBlw== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-async-generator-functions" "^7.2.0" "@babel/plugin-proposal-json-strings" "^7.2.0" - "@babel/plugin-proposal-object-rest-spread" "^7.4.3" + "@babel/plugin-proposal-object-rest-spread" "^7.4.4" "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" "@babel/plugin-syntax-async-generators" "^7.2.0" "@babel/plugin-syntax-json-strings" "^7.2.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" "@babel/plugin-transform-arrow-functions" "^7.2.0" - "@babel/plugin-transform-async-to-generator" "^7.4.0" + "@babel/plugin-transform-async-to-generator" "^7.4.4" "@babel/plugin-transform-block-scoped-functions" "^7.2.0" - "@babel/plugin-transform-block-scoping" "^7.4.0" - "@babel/plugin-transform-classes" "^7.4.3" + "@babel/plugin-transform-block-scoping" "^7.4.4" + "@babel/plugin-transform-classes" "^7.4.4" "@babel/plugin-transform-computed-properties" "^7.2.0" - "@babel/plugin-transform-destructuring" "^7.4.3" - "@babel/plugin-transform-dotall-regex" "^7.4.3" + "@babel/plugin-transform-destructuring" "^7.4.4" + "@babel/plugin-transform-dotall-regex" "^7.4.4" "@babel/plugin-transform-duplicate-keys" "^7.2.0" "@babel/plugin-transform-exponentiation-operator" "^7.2.0" - "@babel/plugin-transform-for-of" "^7.4.3" - "@babel/plugin-transform-function-name" "^7.4.3" + "@babel/plugin-transform-for-of" "^7.4.4" + "@babel/plugin-transform-function-name" "^7.4.4" "@babel/plugin-transform-literals" "^7.2.0" "@babel/plugin-transform-member-expression-literals" "^7.2.0" "@babel/plugin-transform-modules-amd" "^7.2.0" - "@babel/plugin-transform-modules-commonjs" "^7.4.3" - "@babel/plugin-transform-modules-systemjs" "^7.4.0" + "@babel/plugin-transform-modules-commonjs" "^7.4.4" + "@babel/plugin-transform-modules-systemjs" "^7.4.4" "@babel/plugin-transform-modules-umd" "^7.2.0" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.4.2" - "@babel/plugin-transform-new-target" "^7.4.0" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.4.4" + "@babel/plugin-transform-new-target" "^7.4.4" "@babel/plugin-transform-object-super" "^7.2.0" - "@babel/plugin-transform-parameters" "^7.4.3" + "@babel/plugin-transform-parameters" "^7.4.4" "@babel/plugin-transform-property-literals" "^7.2.0" - "@babel/plugin-transform-regenerator" "^7.4.3" + "@babel/plugin-transform-regenerator" "^7.4.4" "@babel/plugin-transform-reserved-words" "^7.2.0" "@babel/plugin-transform-shorthand-properties" "^7.2.0" "@babel/plugin-transform-spread" "^7.2.0" "@babel/plugin-transform-sticky-regex" "^7.2.0" - "@babel/plugin-transform-template-literals" "^7.2.0" + "@babel/plugin-transform-template-literals" "^7.4.4" "@babel/plugin-transform-typeof-symbol" "^7.2.0" - "@babel/plugin-transform-unicode-regex" "^7.4.3" - "@babel/types" "^7.4.0" + "@babel/plugin-transform-unicode-regex" "^7.4.4" + "@babel/types" "^7.4.4" browserslist "^4.5.2" core-js-compat "^3.0.0" invariant "^2.2.2" @@ -807,14 +807,14 @@ "@babel/parser" "^7.2.2" "@babel/types" "^7.2.2" -"@babel/template@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.0.tgz#12474e9c077bae585c5d835a95c0b0b790c25c8b" - integrity sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw== +"@babel/template@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237" + integrity sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.4.0" - "@babel/types" "^7.4.0" + "@babel/parser" "^7.4.4" + "@babel/types" "^7.4.4" "@babel/traverse@^7.0.0": version "7.0.0" @@ -874,17 +874,17 @@ globals "^11.1.0" lodash "^4.17.11" -"@babel/traverse@^7.4.0", "@babel/traverse@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.4.3.tgz#1a01f078fc575d589ff30c0f71bf3c3d9ccbad84" - integrity sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ== +"@babel/traverse@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.4.4.tgz#0776f038f6d78361860b6823887d4f3937133fe8" + integrity sha512-Gw6qqkw/e6AGzlyj9KnkabJX7VcubqPtkUQVAwkc0wUMldr3A/hezNB3Rc5eIvId95iSGkGIOe5hh1kMKf951A== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.4.0" + "@babel/generator" "^7.4.4" "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.4.0" - "@babel/parser" "^7.4.3" - "@babel/types" "^7.4.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/parser" "^7.4.4" + "@babel/types" "^7.4.4" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.11" @@ -923,10 +923,10 @@ lodash "^4.17.11" to-fast-properties "^2.0.0" -"@babel/types@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.4.0.tgz#670724f77d24cce6cc7d8cf64599d511d164894c" - integrity sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA== +"@babel/types@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.4.4.tgz#8db9e9a629bb7c29370009b4b779ed93fe57d5f0" + integrity sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ== dependencies: esutils "^2.0.2" lodash "^4.17.11" @@ -1420,10 +1420,6 @@ ansi-regex@^4.0.0, ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - ansi-styles@^3.1.0, ansi-styles@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" @@ -1510,6 +1506,14 @@ array-ify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" +array-includes@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" + integrity sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0= + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" @@ -1607,14 +1611,6 @@ aws4@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" -babel-code-frame@^6.22.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - babel-core@^7.0.0-bridge.0: version "7.0.0-bridge.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" @@ -1811,11 +1807,7 @@ bser@^2.0.0: dependencies: node-int64 "^0.4.0" -bson@^1.1.0, bson@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/bson/-/bson-1.1.0.tgz#bee57d1fb6a87713471af4e32bcae36de814b5b0" - -bson@^1.1.1: +bson@^1.1.1, bson@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/bson/-/bson-1.1.1.tgz#4330f5e99104c4e751e7351859e2d408279f2f13" integrity sha512-jCGVYLoYMHDkOsbwJZBCqwMHyH4c+wzgI9hG7Z6SZJRXWr+x58pdIbm2i9a/jFGCkRJqRUr8eoI7lDWa0hTkxg== @@ -1960,6 +1952,11 @@ camelcase@^5.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.2.0.tgz#e7522abda5ed94cc0489e1b8466610e88404cf45" integrity sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ== +camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + caniuse-lite@^1.0.30000955: version "1.0.30000957" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000957.tgz#fb1026bf184d7d62c685205358c3b24b9e29f7b3" @@ -1995,16 +1992,6 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - chalk@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.2.0.tgz#477b3bf2f9b8fd5ca9e429747e37f724ee7af240" @@ -2318,10 +2305,6 @@ conventional-changelog-writer@^4.0.0: split "^1.0.0" through2 "^2.0.0" -conventional-commit-types@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/conventional-commit-types/-/conventional-commit-types-2.2.0.tgz#5db95739d6c212acbe7b6f656a11b940baa68946" - conventional-commits-filter@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.0.tgz#a0ce1d1ff7a1dd7fab36bee8e8256d348d135651" @@ -2452,16 +2435,6 @@ cyclist@~0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" -cz-conventional-changelog@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cz-conventional-changelog/-/cz-conventional-changelog-2.1.0.tgz#2f4bc7390e3244e4df293e6ba351e4c740a7c764" - dependencies: - conventional-commit-types "^2.0.0" - lodash.map "^4.5.1" - longest "^1.0.1" - right-pad "^1.0.1" - word-wrap "^1.0.3" - dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -2816,6 +2789,18 @@ es-abstract@^1.6.1: is-callable "^1.1.3" is-regex "^1.0.4" +es-abstract@^1.7.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" + integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== + dependencies: + es-to-primitive "^1.2.0" + function-bind "^1.1.1" + has "^1.0.3" + is-callable "^1.1.4" + is-regex "^1.0.4" + object-keys "^1.0.12" + es-to-primitive@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" @@ -2824,6 +2809,15 @@ es-to-primitive@^1.1.1: is-date-object "^1.0.1" is-symbol "^1.0.1" +es-to-primitive@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" + integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + es6-promise@^4.0.3: version "4.1.1" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a" @@ -2834,7 +2828,7 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -2857,10 +2851,10 @@ eslint-config-airbnb-base@^13.1.0: object.assign "^4.1.0" object.entries "^1.0.4" -eslint-config-prettier@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-4.1.0.tgz#181364895899fff9fd3605fecb5c4f20e7d5f395" - integrity sha512-zILwX9/Ocz4SV2vX7ox85AsrAgXV3f2o2gpIicdMIOra48WYqgUnWNH/cR/iHtmD2Vb3dLSC3LiEJnS05Gkw7w== +eslint-config-prettier@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-4.2.0.tgz#70b946b629cd0e3e98233fd9ecde4cb9778de96c" + integrity sha512-y0uWc/FRfrHhpPZCYflWC8aE0KRJRY04rdZVfl8cL3sEZmOYyaBdhdlQPjKZBnuRMyLVK+JUZr7HaZFClQiH4w== dependencies: get-stdin "^6.0.0" @@ -2872,36 +2866,37 @@ eslint-import-resolver-node@^0.3.2: debug "^2.6.9" resolve "^1.5.0" -eslint-module-utils@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.3.0.tgz#546178dab5e046c8b562bbb50705e2456d7bda49" - integrity sha512-lmDJgeOOjk8hObTysjqH7wyMi+nsHwwvfBykwfhjR1LNdd7C2uFJBvx4OpWYpXOw4df1yE1cDEVd1yLHitk34w== +eslint-module-utils@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz#8b93499e9b00eab80ccb6614e69f03678e84e09a" + integrity sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw== dependencies: debug "^2.6.8" pkg-dir "^2.0.0" -eslint-plugin-flowtype@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.5.1.tgz#903c542c33039bc1db16355fff2d26733903bb0b" - integrity sha512-mIhq7jhBSWNMp3ECmlWK+b9EFmLE+3Jd9axk05LB+snbRPkc3/lYTgb4Bu9lgt1QLmrxFDWsASdKj9CAIehckg== +eslint-plugin-flowtype@^3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.6.1.tgz#99cfa3a30e8a2c9ea40c507b25ea9a320af4ceae" + integrity sha512-VVuPKb5kgWFhxCkAMpL5wi44AK+4nkxa3XXZVa2PKf00n4INNbdKmZC0tT8qeNTHoDPYMXbqak4tGC9YtIOqGw== dependencies: lodash "^4.17.11" -eslint-plugin-import@^2.16.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.16.0.tgz#97ac3e75d0791c4fac0e15ef388510217be7f66f" - integrity sha512-z6oqWlf1x5GkHIFgrSvtmudnqM6Q60KM4KvpWi5ubonMjycLjndvd5+8VAZIsTlHC03djdgJuyKG6XO577px6A== +eslint-plugin-import@^2.17.2: + version "2.17.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.17.2.tgz#d227d5c6dc67eca71eb590d2bb62fb38d86e9fcb" + integrity sha512-m+cSVxM7oLsIpmwNn2WXTJoReOF9f/CtLMo7qOVmKd1KntBy0hEcuNZ3erTmWjx+DxRO0Zcrm5KwAvI9wHcV5g== dependencies: + array-includes "^3.0.3" contains-path "^0.1.0" debug "^2.6.9" doctrine "1.5.0" eslint-import-resolver-node "^0.3.2" - eslint-module-utils "^2.3.0" + eslint-module-utils "^2.4.0" has "^1.0.3" lodash "^4.17.11" minimatch "^3.0.4" read-pkg-up "^2.0.0" - resolve "^1.9.0" + resolve "^1.10.0" eslint-plugin-prettier@^2.2.0: version "2.6.2" @@ -3242,6 +3237,11 @@ find-npm-prefix@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/find-npm-prefix/-/find-npm-prefix-1.0.2.tgz#8d8ce2c78b3b4b9e66c8acc6a37c231eb841cfdf" +find-package-json@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/find-package-json/-/find-package-json-1.2.0.tgz#4057d1b943f82d8445fe52dc9cf456f6b8b58083" + integrity sha512-+SOGcLGYDJHtyqHd87ysBhmaeQ95oWspDKnMXBrnQ9Eq4OkLNqejgoaD8xVWu6GPa0B6roa6KinCMEMcVeqONw== + find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" @@ -3276,10 +3276,10 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916" integrity sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg== -flow-bin@^0.96.0: - version "0.96.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.96.0.tgz#3b0379d97304dc1879ae6db627cd2d6819998661" - integrity sha512-OSxERs0EdhVxEVCst/HmlT/RcnXsQQIRqcfK9J9wC8/93JQj+xQz4RtlsmYe1PSRYaozuDLyPS5pIA81Zwzaww== +flow-bin@^0.98.0: + version "0.98.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.98.0.tgz#3361a03682326a83a5f0a864749f4f7f0d826bce" + integrity sha512-vuiYjBVt82eYF+dEk9Zqa8hTSDvbhl/czxzFRLZm9/XHbJnYNMTwFoNFYAQT9IQ6ACNBIbwSTIfxroieuKja7g== flush-write-stream@^1.0.0: version "1.0.3" @@ -3591,28 +3591,28 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@~4.1.11 resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" integrity sha1-TK+tdrxi8C+gObL5Tpo906ORpyU= -graphql-compose-connection@>=5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/graphql-compose-connection/-/graphql-compose-connection-5.0.0.tgz#3360bcc2b7532228db2082ded3662f017b89ad8f" - integrity sha512-KXnGeG+gQSWVR+oU6fFD810pd9/ZICBpAZxun70wgD6/QNtSsA+gRzBgRRqicvMa6UVSBvfmCpxzwTQMBvwqQA== +graphql-compose-connection@>=6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/graphql-compose-connection/-/graphql-compose-connection-6.0.0.tgz#8a9d7bd45810463aab95f9bb3b8262c25a545d7e" + integrity sha512-wDgBwfzyGlz3szuv+0CmVjMqKawcd2bUpPNPwZYcL637OOdNQTiAQ8lgyisDo1Xvjc2syRJNPQlx0Rm9l4K/BA== -graphql-compose-pagination@>=5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/graphql-compose-pagination/-/graphql-compose-pagination-5.1.0.tgz#19750ca63047afc94459e6a315f034960420ce04" - integrity sha512-l89G0PBWYnyi0bTTzwnJCU6vVz/TyxK+FRn9A0LKHhFCdXSJQUz9jL5FvJvFmYOEYHUhnHxFGdzwEE1fAw8now== +graphql-compose-pagination@>=6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/graphql-compose-pagination/-/graphql-compose-pagination-6.0.0.tgz#91207e3d47af682f78ae8803e43fd3f004b3298b" + integrity sha512-lhSIEBXgY7FJZyt2SowKR5n402reRHJztoUKL2EZa+ykvai1MU8U1qCaTZH5KJiw5PjQur1VDw3cCvolKagWjw== -graphql-compose@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/graphql-compose/-/graphql-compose-6.2.0.tgz#cb385c82baa64a5870cde5381e2c3498f8dc1087" - integrity sha512-DuxSGduPxkFQbfr1XZcOqYC5ifmNea9zgJ924ugpNZfXWT9iQTaUiXQFZ4JM6AWkp3VHI7xwg3t7KN0tGLv1EA== +graphql-compose@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/graphql-compose/-/graphql-compose-7.0.0.tgz#0bf6425262d207ca649fe49b798342a602a33d30" + integrity sha512-mkplljcPf/b/HkpeMDrYNDy56uJRbnCkY4d/yvAFzSiYzIrTCcuLCvpYmiqBqzwHdmyeIfOVuf5BXX8eKqZIFw== dependencies: - graphql-type-json "^0.2.4" + graphql-type-json "^0.3.0" object-path "^0.11.4" -graphql-type-json@^0.2.4: - version "0.2.4" - resolved "https://registry.yarnpkg.com/graphql-type-json/-/graphql-type-json-0.2.4.tgz#545af27903e40c061edd30840a272ea0a49992f9" - integrity sha512-/tq02ayMQjrG4oDFDRLLrPk0KvJXue0nVXoItBe7uAdbNXjQUu+HYCBdAmPLQoseVzUKKMzrhq2P/sfI76ON6w== +graphql-type-json@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/graphql-type-json/-/graphql-type-json-0.3.0.tgz#bb32e1b74bf52ebc690f9df12b4067bc061f818a" + integrity sha512-lnxg5HiB95yxy+/5cDKtP6pZo0zgntsOmqsjeCBXFGJ4YoMF3+1YaSEKWJntNTu+VsAm3zf6lPxFpp1kxzofLA== graphql@14.2.1: version "14.2.1" @@ -3675,12 +3675,6 @@ har-validator@~5.1.0: ajv "^5.3.0" har-schema "^2.0.0" -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - has-flag@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" @@ -4015,6 +4009,11 @@ is-callable@^1.1.1, is-callable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" +is-callable@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" + integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== + is-ci@^1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" @@ -4183,6 +4182,13 @@ is-symbol@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" +is-symbol@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" + integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== + dependencies: + has-symbols "^1.0.0" + is-text-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" @@ -4676,10 +4682,6 @@ js-levenshtein@^1.1.3: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - js-yaml@^3.12.0: version "3.12.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" @@ -5003,10 +5005,6 @@ lodash.isstring@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" -lodash.map@^4.5.1: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" - lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" @@ -5363,12 +5361,12 @@ modify-values@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.0.tgz#e2b6cdeb9ce19f99317a53722f3dbf5df5eaaab2" -mongodb-core@3.1.11: - version "3.1.11" - resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-3.1.11.tgz#b253038dbb4d7329f3d1c2ee5400bb0c9221fde5" - integrity sha512-rD2US2s5qk/ckbiiGFHeu+yKYDXdJ1G87F6CG3YdaZpzdOm5zpoAZd/EKbPmFO6cQZ+XVXBXBJ660sSI0gc6qg== +mongodb-core@3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-3.2.2.tgz#d1c084b34c102a98b4734087800115e639d907c5" + integrity sha512-YRgC39MuzKL0uoGoRdTmV1e9m47NbMnYmuEx4IOkgWAGXPSEzRY7cwb3N0XMmrDMnD9vp7MysNyAriIIeGgIQg== dependencies: - bson "^1.1.0" + bson "^1.1.1" require_optional "^1.0.1" safe-buffer "^5.1.2" optionalDependencies: @@ -5385,15 +5383,17 @@ mongodb-core@^3.2.3: optionalDependencies: saslprep "^1.0.0" -mongodb-memory-server@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/mongodb-memory-server/-/mongodb-memory-server-4.2.2.tgz#d6a863f32dd83b7e76eadc63540ade67e246c3d9" - integrity sha512-XZKg9TDyZfPS6q71nZrXMze7Ew04U/VQiD7VRvUYrh7Xg2zlPc4qYk7x8cwEqpNSbMwLkDuCKZIA7JTCcKI+xw== +mongodb-memory-server-core@5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/mongodb-memory-server-core/-/mongodb-memory-server-core-5.1.0.tgz#fd0b39b9f5b08eb9e7ffdf2ba79146e5f6d109bc" + integrity sha512-M/GWVvFze0geP2smoy0ns+Yz5l4BRP6Y66OKc+w9zlX422ydQEA04bLQjooPqoaBTrV90xuDj5E+zejn/YkPew== dependencies: + camelcase "^5.3.1" debug "^4.1.1" decompress "^4.2.0" dedent "^0.7.0" find-cache-dir "^2.0.0" + find-package-json "^1.2.0" get-port "^4.2.0" getos "^3.1.1" https-proxy-agent "^2.2.1" @@ -5405,12 +5405,19 @@ mongodb-memory-server@^4.2.2: optionalDependencies: mongodb ">=3.0.0" -mongodb@3.1.13: - version "3.1.13" - resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.1.13.tgz#f8cdcbb36ad7a08b570bd1271c8525753f75f9f4" - integrity sha512-sz2dhvBZQWf3LRNDhbd30KHVzdjZx9IKC0L+kSZ/gzYquCF5zPOgGqRz6sSCqYZtKP2ekB4nfLxhGtzGHnIKxA== +mongodb-memory-server@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/mongodb-memory-server/-/mongodb-memory-server-5.1.0.tgz#6861b1929bea040c25b25a006241a9c5cec88827" + integrity sha512-CN4fjt90fi6A3PSJIx6xYxIRqpxF1rJoz4BcJv6LmGyRAOAvCbr3SqRbfXJMS26wTDyHylXtW32PhdykDohogA== + dependencies: + mongodb-memory-server-core "5.1.0" + +mongodb@3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.2.2.tgz#49b592be3cd50097f78e0964488d18c2e189de20" + integrity sha512-xQ6apOOV+w7VFApdaJpWhYhzartpjIDFQjG0AwgJkLh7dBs7PTsq4A3Bia2QWpDohmAzTBIdQVLMqqLy0mwt3Q== dependencies: - mongodb-core "3.1.11" + mongodb-core "3.2.2" safe-buffer "^5.1.2" mongodb@>=3.0.0: @@ -5425,22 +5432,23 @@ mongoose-legacy-pluralize@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz#3ba9f91fa507b5186d399fb40854bff18fb563e4" -mongoose@^5.4.22: - version "5.4.22" - resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-5.4.22.tgz#45000ea9aefa687dce1dc087db71b5084634d119" - integrity sha512-rbtmFmXe5YJfBrVfOpSW2xeSAKFtnJ5RLQjl4ULzT1icmY/SUHtJ5b+mW4SMCEk7whm/w+2oHO9qMBr8UI1xIw== +mongoose@^5.5.4: + version "5.5.4" + resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-5.5.4.tgz#77b0664dd7e49a0a158d1eb83f6e53433b57b48b" + integrity sha512-xzS7fJtXGjCOZozCtlyFS8graMub1L9knp37+1dJCDmWzOtXVHeLjV2XIC9tX0sE54cxeG5rHvSmIkLpeHjjmA== dependencies: async "2.6.1" - bson "~1.1.0" + bson "~1.1.1" kareem "2.3.0" - mongodb "3.1.13" - mongodb-core "3.1.11" + mongodb "3.2.2" + mongodb-core "3.2.2" mongoose-legacy-pluralize "1.0.2" - mpath "0.5.1" + mpath "0.5.2" mquery "3.2.0" ms "2.1.1" regexp-clone "0.0.1" safe-buffer "5.1.2" + sift "7.0.1" sliced "1.0.1" move-concurrently@^1.0.1: @@ -5454,9 +5462,10 @@ move-concurrently@^1.0.1: rimraf "^2.5.4" run-queue "^1.0.3" -mpath@0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mpath/-/mpath-0.5.1.tgz#17131501f1ff9e6e4fbc8ffa875aa7065b5775ab" +mpath@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/mpath/-/mpath-0.5.2.tgz#b1eac586dffb5175d2f51ca9aacba35d9940dd41" + integrity sha512-NOeCoW6AYc3hLi30npe7uzbD9b4FQZKH40YKABUCCvaKKL5agj6YzvHoNx8jQpDMNPgIa5bvSZQbQpWBAVD0Kw== mquery@3.2.0: version "3.2.0" @@ -5903,6 +5912,11 @@ object-keys@^1.0.11: version "1.0.12" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" +object-keys@^1.0.12: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + object-keys@^1.0.8: version "1.0.11" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" @@ -6315,10 +6329,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^1.16.4: - version "1.16.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717" - integrity sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g== +prettier@^1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.0.tgz#53b303676eed22cc14a9f0cec09b477b3026c008" + integrity sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw== pretty-format@^24.7.0: version "24.7.0" @@ -6890,13 +6904,20 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" +resolve@^1.10.0: + version "1.10.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.1.tgz#664842ac960795bbe758221cdccda61fb64b5f18" + integrity sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA== + dependencies: + path-parse "^1.0.6" + resolve@^1.3.2, resolve@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" dependencies: path-parse "^1.0.5" -resolve@^1.5.0, resolve@^1.9.0: +resolve@^1.5.0: version "1.10.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.0.tgz#3bdaaeaf45cc07f375656dfd2e54ed0810b101ba" integrity sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg== @@ -6928,10 +6949,6 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -right-pad@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/right-pad/-/right-pad-1.0.1.tgz#8ca08c2cbb5b55e74dafa96bf7fd1a27d568c8d0" - rimraf@2: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" @@ -7139,6 +7156,11 @@ shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" +sift@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/sift/-/sift-7.0.1.tgz#47d62c50b159d316f1372f8b53f9c10cd21a4b08" + integrity sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g== + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -7522,10 +7544,6 @@ strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - supports-color@^4.0.0: version "4.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" @@ -7747,12 +7765,12 @@ tslint-plugin-prettier@^2.0.1: lines-and-columns "^1.1.6" tslib "^1.7.1" -tslint@^5.15.0: - version "5.15.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.15.0.tgz#6ffb180986d63afa1e531feb2a134dbf961e27d3" - integrity sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA== +tslint@^5.16.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.16.0.tgz#ae61f9c5a98d295b9a4f4553b1b1e831c1984d67" + integrity sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA== dependencies: - babel-code-frame "^6.22.0" + "@babel/code-frame" "^7.0.0" builtin-modules "^1.1.1" chalk "^2.3.0" commander "^2.12.1" @@ -7793,10 +7811,10 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@^3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.2.tgz#9ed4e6475d906f589200193be056f5913caed481" - integrity sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A== +typescript@^3.4.5: + version "3.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99" + integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw== uglify-js@^2.6: version "2.8.29" @@ -8083,10 +8101,6 @@ window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" -word-wrap@^1.0.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"