File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ module.exports = {
2323 '^.+\\.ts?$' : [
2424 'ts-jest' ,
2525 {
26- tsconfig : 'tsconfig.json' , // Specify your TypeScript config file
26+ tsconfig : 'tsconfig.json' ,
2727 } ,
2828 ] ,
2929 } ,
Original file line number Diff line number Diff line change 11import { ExecutionResult , graphql } from 'graphql' ;
22import { getSchema } from '../src/services/ApolloServices/ApolloServerService' ;
33
4- async function testGraphQLQuery < T > ( query : string , variables ?: Record < string , any > ) {
4+ async function testGraphQLQuery < T > ( query : string , variables ?: Record < string , never > ) : Promise < ExecutionResult < T > > {
55 const schema = await getSchema ( ) ;
66
7- return graphql ( {
7+ const result : Promise < ExecutionResult < T > > = ( await graphql ( {
88 schema,
99 source : query ,
1010 variableValues : variables ,
11- } ) as unknown as Promise < ExecutionResult < T > > ;
11+ } ) ) as Promise < ExecutionResult < T > > ;
12+
13+ return result ;
1214}
1315
1416export { testGraphQLQuery } ;
You can’t perform that action at this time.
0 commit comments