Skip to content

Commit 582d681

Browse files
committed
cleanup
1 parent 7fce09a commit 582d681

File tree

5 files changed

+5
-9
lines changed

5 files changed

+5
-9
lines changed

src/resolvers/__tests__/findById-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { expect } from 'chai';
44
import { UserModel } from '../../__mocks__/userModel.js';
55
import findById from '../findById';
66
import Resolver from '../../../../graphql-compose/src/resolver/resolver';
7-
import InputTypeComposer from '../../../../graphql-compose/src/typeInputComposer';
87
import { GraphQLNonNull } from 'graphql';
98
import GraphQLMongoID from '../../types/mongoid';
109

src/resolvers/__tests__/findByIds-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { expect } from 'chai';
44
import { UserModel } from '../../__mocks__/userModel.js';
55
import findByIds from '../findByIds';
66
import Resolver from '../../../../graphql-compose/src/resolver/resolver';
7-
import InputTypeComposer from '../../../../graphql-compose/src/typeInputComposer';
87
import { GraphQLNonNull, GraphQLList, GraphQLObjectType } from 'graphql';
98
import GraphQLMongoID from '../../types/mongoid';
109

src/resolvers/__tests__/updateOne-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import updateOne from '../updateOne';
66
import Resolver from '../../../../graphql-compose/src/resolver/resolver';
77
import TypeComposer from '../../../../graphql-compose/src/typeComposer';
88
import { convertModelToGraphQL } from '../../fieldsConverter';
9-
import { GraphQLString } from 'graphql';
109
import GraphQLMongoID from '../../types/mongoid';
1110

1211
const UserType = convertModelToGraphQL(UserModel, 'User');

src/resolvers/removeById.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/* eslint-disable no-param-reassign */
33

44
import { projectionHelper } from './helpers/projection';
5-
import findById from './findById';
65
import {
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: {

src/resolvers/updateOne.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { inputHelperArgsGen } from './helpers/input';
55
import { filterHelperArgsGen } from './helpers/filter';
66
import { sortHelperArgsGen } from './helpers/sort';
77
import findOne from './findOne';
8-
import { GraphQLObjectType, GraphQLString } from 'graphql';
8+
import { GraphQLObjectType } from 'graphql';
9+
import GraphQLMongoID from '../types/mongoid';
910

1011
import 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: {

0 commit comments

Comments
 (0)