File tree Expand file tree Collapse file tree 5 files changed +5
-9
lines changed
Expand file tree Collapse file tree 5 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import { expect } from 'chai';
44import { UserModel } from '../../__mocks__/userModel.js' ;
55import findById from '../findById' ;
66import Resolver from '../../../../graphql-compose/src/resolver/resolver' ;
7- import InputTypeComposer from '../../../../graphql-compose/src/typeInputComposer' ;
87import { GraphQLNonNull } from 'graphql' ;
98import GraphQLMongoID from '../../types/mongoid' ;
109
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import { expect } from 'chai';
44import { UserModel } from '../../__mocks__/userModel.js' ;
55import findByIds from '../findByIds' ;
66import Resolver from '../../../../graphql-compose/src/resolver/resolver' ;
7- import InputTypeComposer from '../../../../graphql-compose/src/typeInputComposer' ;
87import { GraphQLNonNull , GraphQLList , GraphQLObjectType } from 'graphql' ;
98import GraphQLMongoID from '../../types/mongoid' ;
109
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import updateOne from '../updateOne';
66import Resolver from '../../../../graphql-compose/src/resolver/resolver' ;
77import TypeComposer from '../../../../graphql-compose/src/typeComposer' ;
88import { convertModelToGraphQL } from '../../fieldsConverter' ;
9- import { GraphQLString } from 'graphql' ;
109import GraphQLMongoID from '../../types/mongoid' ;
1110
1211const UserType = convertModelToGraphQL ( UserModel , 'User' ) ;
Original file line number Diff line number Diff line change 22/* eslint-disable no-param-reassign */
33
44import { projectionHelper } from './helpers/projection' ;
5- import findById from './findById' ;
65import {
76 GraphQLObjectType ,
87 GraphQLNonNull ,
@@ -23,9 +22,8 @@ export default function removeById(
2322 name : 'removeById' ,
2423 kind : 'mutation' ,
2524 description : 'Remove one document: '
26- + '1) Retrieve one document by findById. '
27- + '2) Remove mongoose document with hooks via findByIdAndRemove. '
28- + '3) Return removed document.' ,
25+ + '1) Retrieve one document and remove with hooks via findByIdAndRemove. '
26+ + '2) Return removed document.' ,
2927 outputType : new GraphQLObjectType ( {
3028 name : `RemoveById${ gqType . name } Payload` ,
3129 fields : {
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ import { inputHelperArgsGen } from './helpers/input';
55import { filterHelperArgsGen } from './helpers/filter' ;
66import { sortHelperArgsGen } from './helpers/sort' ;
77import findOne from './findOne' ;
8- import { GraphQLObjectType , GraphQLString } from 'graphql' ;
8+ import { GraphQLObjectType } from 'graphql' ;
9+ import GraphQLMongoID from '../types/mongoid' ;
910
1011import type {
1112 MongooseModelT ,
@@ -31,7 +32,7 @@ export default function updateOne(
3132 name : `UpdateOne${ gqType . name } Payload` ,
3233 fields : {
3334 recordId : {
34- type : GraphQLString ,
35+ type : GraphQLMongoID ,
3536 description : 'Updated document ID' ,
3637 } ,
3738 record : {
You can’t perform that action at this time.
0 commit comments