@@ -10,7 +10,7 @@ import type {
10
10
EnumTypeComposer ,
11
11
ComposeOutputType ,
12
12
} from 'graphql-compose' ;
13
- import { upperFirst , schemaComposer as globalSchemaComposer } from 'graphql-compose' ;
13
+ import { upperFirst } from 'graphql-compose' ;
14
14
import type { GraphQLScalarType } from 'graphql-compose/lib/graphql' ;
15
15
import GraphQLMongoID from './types/mongoid' ;
16
16
@@ -116,9 +116,9 @@ export function getFieldsFromModel(model: MongooseModel | MongoosePseudoModelT):
116
116
export function convertModelToGraphQL < TSource , TContext > (
117
117
model : MongooseModel | MongoosePseudoModelT ,
118
118
typeName : string ,
119
- schemaComposer ? : SchemaComposer < TContext >
119
+ schemaComposer : SchemaComposer < TContext >
120
120
) : ObjectTypeComposer < TSource , TContext > {
121
- const sc = schemaComposer || globalSchemaComposer ;
121
+ const sc = schemaComposer ;
122
122
123
123
if ( ! typeName ) {
124
124
throw new Error ( 'You provide empty name for type. `name` argument should be non-empty string.' ) ;
@@ -166,9 +166,9 @@ export function convertModelToGraphQL<TSource, TContext>(
166
166
export function convertSchemaToGraphQL (
167
167
schema : Schema < any > ,
168
168
typeName : string ,
169
- schemaComposer ? : SchemaComposer < any >
169
+ schemaComposer : SchemaComposer < any >
170
170
) : ObjectTypeComposer < any , any > {
171
- const sc = schemaComposer || globalSchemaComposer ;
171
+ const sc = schemaComposer ;
172
172
173
173
if ( ! typeName ) {
174
174
throw new Error ( 'You provide empty name for type. `name` argument should be non-empty string.' ) ;
0 commit comments