@@ -305,28 +305,28 @@ export function buildASTSchema(
305
305
function produceInputType ( typeNode : TypeNode ) : GraphQLInputType {
306
306
const type = produceType ( typeNode ) ;
307
307
invariant ( isInputType ( type ) ,
308
- validationError ( 'Expected Input type' , typeNode , source ) ) ;
308
+ validationError ( source , typeNode , 'Expected Input type' ) ) ;
309
309
return ( type : any ) ;
310
310
}
311
311
312
312
function produceOutputType ( typeNode : TypeNode ) : GraphQLOutputType {
313
313
const type = produceType ( typeNode ) ;
314
314
invariant ( isOutputType ( type ) ,
315
- validationError ( 'Expected Output type' , typeNode , source ) ) ;
315
+ validationError ( source , typeNode , 'Expected Output type' ) ) ;
316
316
return ( type : any ) ;
317
317
}
318
318
319
319
function produceObjectType ( typeNode : TypeNode ) : GraphQLObjectType {
320
320
const type = produceType ( typeNode ) ;
321
321
invariant ( type instanceof GraphQLObjectType ,
322
- validationError ( 'Expected Object type' , typeNode , source ) ) ;
322
+ validationError ( source , typeNode , 'Expected Object type' ) ) ;
323
323
return type ;
324
324
}
325
325
326
326
function produceInterfaceType ( typeNode : TypeNode ) : GraphQLInterfaceType {
327
327
const type = produceType ( typeNode ) ;
328
328
invariant ( type instanceof GraphQLInterfaceType ,
329
- validationError ( 'Expected Interface type' , typeNode , source ) ) ;
329
+ validationError ( source , typeNode , 'Expected Interface type' ) ) ;
330
330
return type ;
331
331
}
332
332
0 commit comments