File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 2
2
EnumTypeComposer ,
3
3
SchemaComposer ,
4
4
ObjectTypeComposer ,
5
+ ComposeOutputType ,
5
6
} from 'graphql-compose' ;
6
7
import { GraphQLScalarType } from 'graphql-compose/lib/graphql' ;
7
8
import { Model , Schema } from 'mongoose' ;
@@ -12,12 +13,6 @@ type MongooseFieldT = any;
12
13
type MongooseFieldMapT = { [ fieldName : string ] : MongooseFieldT } ;
13
14
type ComposeScalarType = string | GraphQLScalarType ;
14
15
15
- type ComposeOutputType =
16
- | ObjectTypeComposer < any >
17
- | ComposeScalarType
18
- | EnumTypeComposer
19
- | [ ObjectTypeComposer < any > | ComposeScalarType | EnumTypeComposer ] ;
20
-
21
16
export type MongoosePseudoModelT = {
22
17
schema : Schema ;
23
18
} ;
@@ -56,7 +51,7 @@ export function convertFieldToGraphQL(
56
51
field : MongooseFieldT ,
57
52
prefix : string | undefined ,
58
53
schemaComposer : SchemaComposer < any > ,
59
- ) : ComposeOutputType ;
54
+ ) : ComposeOutputType < any , any > ;
60
55
61
56
export function deriveComplexType (
62
57
field : MongooseFieldT ,
@@ -68,7 +63,7 @@ export function arrayToGraphQL(
68
63
field : MongooseFieldT ,
69
64
prefix : string | undefined ,
70
65
schemaComposer : SchemaComposer < any > ,
71
- ) : ComposeOutputType ;
66
+ ) : ComposeOutputType < any , any > ;
72
67
73
68
export function embeddedToGraphQL (
74
69
field : MongooseFieldT ,
You can’t perform that action at this time.
0 commit comments