@@ -31,7 +31,7 @@ export class GraphQLServer {
31
31
subscriptionServer : SubscriptionServer | null
32
32
options : Options = {
33
33
tracing : { mode : 'http-header' } ,
34
- port : process . env . PORT ? parseInt ( process . env . PORT , 10 ) : 4000 ,
34
+ port : process . env . PORT || 4000 ,
35
35
endpoint : '/' ,
36
36
subscriptions : '/' ,
37
37
playground : '/' ,
@@ -298,11 +298,11 @@ function mergeTypeDefs(typeDefs: ITypeDefinitions): string {
298
298
if ( typeof typeDefs === 'string' ) {
299
299
if ( typeDefs . endsWith ( 'graphql' ) ) {
300
300
const schemaPath = path . resolve ( typeDefs )
301
-
301
+
302
302
if ( ! fs . existsSync ( schemaPath ) ) {
303
303
throw new Error ( `No schema found for path: ${ schemaPath } ` )
304
304
}
305
-
305
+
306
306
return importSchema ( schemaPath )
307
307
} else {
308
308
return typeDefs
@@ -318,10 +318,15 @@ function mergeTypeDefs(typeDefs: ITypeDefinitions): string {
318
318
}
319
319
320
320
if ( Array . isArray ( typeDefs ) ) {
321
- return typeDefs . reduce < string > ( ( acc , t ) => acc + '\n' + mergeTypeDefs ( t ) , '' )
321
+ return typeDefs . reduce < string > (
322
+ ( acc , t ) => acc + '\n' + mergeTypeDefs ( t ) ,
323
+ '' ,
324
+ )
322
325
}
323
326
324
- throw new Error ( 'Typedef is not string, function, DocumentNode or array of previous' )
327
+ throw new Error (
328
+ 'Typedef is not string, function, DocumentNode or array of previous' ,
329
+ )
325
330
}
326
331
327
332
function isDocumentNode ( node : any ) : node is DocumentNode {
0 commit comments