@@ -10,7 +10,7 @@ import { describe, it } from 'mocha';
10
10
11
11
import { missingFieldArgMessage } from '../../validation/rules/ProvidedNonNullArguments' ;
12
12
import {
13
- graphql ,
13
+ graphqlSync ,
14
14
GraphQLSchema ,
15
15
GraphQLObjectType ,
16
16
GraphQLList ,
@@ -22,7 +22,7 @@ import {
22
22
import { getIntrospectionQuery } from '../../utilities/introspectionQuery' ;
23
23
24
24
describe ( 'Introspection' , ( ) => {
25
- it ( 'executes an introspection query' , async ( ) => {
25
+ it ( 'executes an introspection query' , ( ) => {
26
26
const EmptySchema = new GraphQLSchema ( {
27
27
query : new GraphQLObjectType ( {
28
28
name : 'QueryRoot' ,
@@ -33,7 +33,7 @@ describe('Introspection', () => {
33
33
} ) ;
34
34
35
35
return expect (
36
- await graphql ( EmptySchema , getIntrospectionQuery ( ) ) ,
36
+ graphqlSync ( EmptySchema , getIntrospectionQuery ( ) ) ,
37
37
) . to . containSubset ( {
38
38
data : {
39
39
__schema : {
@@ -815,7 +815,7 @@ describe('Introspection', () => {
815
815
} ) ;
816
816
} ) ;
817
817
818
- it ( 'introspects on input object' , async ( ) => {
818
+ it ( 'introspects on input object' , ( ) => {
819
819
const TestInputObject = new GraphQLInputObjectType ( {
820
820
name : 'TestInputObject' ,
821
821
fields : {
@@ -870,7 +870,7 @@ describe('Introspection', () => {
870
870
}
871
871
` ;
872
872
873
- return expect ( await graphql ( schema , request ) ) . to . containSubset ( {
873
+ return expect ( graphqlSync ( schema , request ) ) . to . containSubset ( {
874
874
data : {
875
875
__schema : {
876
876
types : [
@@ -917,7 +917,7 @@ describe('Introspection', () => {
917
917
} ) ;
918
918
} ) ;
919
919
920
- it ( 'supports the __type root field' , async ( ) => {
920
+ it ( 'supports the __type root field' , ( ) => {
921
921
const TestType = new GraphQLObjectType ( {
922
922
name : 'TestType' ,
923
923
fields : {
@@ -936,7 +936,7 @@ describe('Introspection', () => {
936
936
}
937
937
` ;
938
938
939
- return expect ( await graphql ( schema , request ) ) . to . deep . equal ( {
939
+ return expect ( graphqlSync ( schema , request ) ) . to . deep . equal ( {
940
940
data : {
941
941
__type : {
942
942
name : 'TestType' ,
@@ -945,7 +945,7 @@ describe('Introspection', () => {
945
945
} ) ;
946
946
} ) ;
947
947
948
- it ( 'identifies deprecated fields' , async ( ) => {
948
+ it ( 'identifies deprecated fields' , ( ) => {
949
949
const TestType = new GraphQLObjectType ( {
950
950
name : 'TestType' ,
951
951
fields : {
@@ -973,7 +973,7 @@ describe('Introspection', () => {
973
973
}
974
974
` ;
975
975
976
- return expect ( await graphql ( schema , request ) ) . to . deep . equal ( {
976
+ return expect ( graphqlSync ( schema , request ) ) . to . deep . equal ( {
977
977
data : {
978
978
__type : {
979
979
name : 'TestType' ,
@@ -994,7 +994,7 @@ describe('Introspection', () => {
994
994
} ) ;
995
995
} ) ;
996
996
997
- it ( 'respects the includeDeprecated parameter for fields' , async ( ) => {
997
+ it ( 'respects the includeDeprecated parameter for fields' , ( ) => {
998
998
const TestType = new GraphQLObjectType ( {
999
999
name : 'TestType' ,
1000
1000
fields : {
@@ -1026,7 +1026,7 @@ describe('Introspection', () => {
1026
1026
}
1027
1027
` ;
1028
1028
1029
- return expect ( await graphql ( schema , request ) ) . to . deep . equal ( {
1029
+ return expect ( graphqlSync ( schema , request ) ) . to . deep . equal ( {
1030
1030
data : {
1031
1031
__type : {
1032
1032
name : 'TestType' ,
@@ -1053,7 +1053,7 @@ describe('Introspection', () => {
1053
1053
} ) ;
1054
1054
} ) ;
1055
1055
1056
- it ( 'identifies deprecated enum values' , async ( ) => {
1056
+ it ( 'identifies deprecated enum values' , ( ) => {
1057
1057
const TestEnum = new GraphQLEnumType ( {
1058
1058
name : 'TestEnum' ,
1059
1059
values : {
@@ -1086,7 +1086,7 @@ describe('Introspection', () => {
1086
1086
}
1087
1087
` ;
1088
1088
1089
- return expect ( await graphql ( schema , request ) ) . to . deep . equal ( {
1089
+ return expect ( graphqlSync ( schema , request ) ) . to . deep . equal ( {
1090
1090
data : {
1091
1091
__type : {
1092
1092
name : 'TestEnum' ,
@@ -1112,7 +1112,7 @@ describe('Introspection', () => {
1112
1112
} ) ;
1113
1113
} ) ;
1114
1114
1115
- it ( 'respects the includeDeprecated parameter for enum values' , async ( ) => {
1115
+ it ( 'respects the includeDeprecated parameter for enum values' , ( ) => {
1116
1116
const TestEnum = new GraphQLEnumType ( {
1117
1117
name : 'TestEnum' ,
1118
1118
values : {
@@ -1149,7 +1149,7 @@ describe('Introspection', () => {
1149
1149
}
1150
1150
` ;
1151
1151
1152
- return expect ( await graphql ( schema , request ) ) . to . deep . equal ( {
1152
+ return expect ( graphqlSync ( schema , request ) ) . to . deep . equal ( {
1153
1153
data : {
1154
1154
__type : {
1155
1155
name : 'TestEnum' ,
@@ -1185,7 +1185,7 @@ describe('Introspection', () => {
1185
1185
} ) ;
1186
1186
} ) ;
1187
1187
1188
- it ( 'fails as expected on the __type root field without an arg' , async ( ) => {
1188
+ it ( 'fails as expected on the __type root field without an arg' , ( ) => {
1189
1189
const TestType = new GraphQLObjectType ( {
1190
1190
name : 'TestType' ,
1191
1191
fields : {
@@ -1204,7 +1204,7 @@ describe('Introspection', () => {
1204
1204
}
1205
1205
` ;
1206
1206
1207
- return expect ( await graphql ( schema , request ) ) . to . containSubset ( {
1207
+ return expect ( graphqlSync ( schema , request ) ) . to . containSubset ( {
1208
1208
errors : [
1209
1209
{
1210
1210
message : missingFieldArgMessage ( '__type' , 'name' , 'String!' ) ,
@@ -1214,7 +1214,7 @@ describe('Introspection', () => {
1214
1214
} ) ;
1215
1215
} ) ;
1216
1216
1217
- it ( 'exposes descriptions on types and fields' , async ( ) => {
1217
+ it ( 'exposes descriptions on types and fields' , ( ) => {
1218
1218
const QueryRoot = new GraphQLObjectType ( {
1219
1219
name : 'QueryRoot' ,
1220
1220
fields : {
@@ -1236,7 +1236,7 @@ describe('Introspection', () => {
1236
1236
}
1237
1237
` ;
1238
1238
1239
- return expect ( await graphql ( schema , request ) ) . to . deep . equal ( {
1239
+ return expect ( graphqlSync ( schema , request ) ) . to . deep . equal ( {
1240
1240
data : {
1241
1241
schemaType : {
1242
1242
name : '__Schema' ,
@@ -1277,7 +1277,7 @@ describe('Introspection', () => {
1277
1277
} ) ;
1278
1278
} ) ;
1279
1279
1280
- it ( 'exposes descriptions on enums' , async ( ) => {
1280
+ it ( 'exposes descriptions on enums' , ( ) => {
1281
1281
const QueryRoot = new GraphQLObjectType ( {
1282
1282
name : 'QueryRoot' ,
1283
1283
fields : {
@@ -1299,7 +1299,7 @@ describe('Introspection', () => {
1299
1299
}
1300
1300
` ;
1301
1301
1302
- return expect ( await graphql ( schema , request ) ) . to . deep . equal ( {
1302
+ return expect ( graphqlSync ( schema , request ) ) . to . deep . equal ( {
1303
1303
data : {
1304
1304
typeKindType : {
1305
1305
name : '__TypeKind' ,
0 commit comments