@@ -61,11 +61,6 @@ function getHintSuggestions(queryString, cursor) {
6161 } ) ;
6262}
6363
64- function checkSuggestions ( source , suggestions ) {
65- const titles = suggestions . map ( suggestion => suggestion . text ) ;
66- expect ( titles ) . to . deep . equal ( source ) ;
67- }
68-
6964function getExpectedSuggestions ( list ) {
7065 return list . map ( item => ( {
7166 text : item . text ,
@@ -141,16 +136,19 @@ describe('graphql-hint', () => {
141136 text : '__typename' ,
142137 type : GraphQLNonNull ( GraphQLString ) ,
143138 description : 'The name of the current Object type at runtime.' ,
139+ isDeprecated : false ,
144140 } ,
145141 {
146142 text : '__schema' ,
147143 type : GraphQLNonNull ( __Schema ) ,
148144 description : 'Access the current type schema of this server.' ,
145+ isDeprecated : false ,
149146 } ,
150147 {
151148 text : '__type' ,
152149 type : __Type ,
153150 description : 'Request the type information of a single type.' ,
151+ isDeprecated : false ,
154152 } ,
155153 ] ;
156154 const expectedSuggestions = getExpectedSuggestions ( list ) ;
@@ -205,6 +203,7 @@ describe('graphql-hint', () => {
205203 text : '__typename' ,
206204 type : GraphQLNonNull ( GraphQLString ) ,
207205 description : 'The name of the current Object type at runtime.' ,
206+ isDeprecated : false ,
208207 } ,
209208 ] ;
210209 const expectedSuggestions = getExpectedSuggestions ( list ) ;
@@ -226,72 +225,58 @@ describe('graphql-hint', () => {
226225 {
227226 text : 'string' ,
228227 type : GraphQLString ,
229- description : null ,
230228 } ,
231229 {
232230 text : 'int' ,
233231 type : GraphQLInt ,
234- description : null ,
235232 } ,
236233 {
237234 text : 'float' ,
238235 type : GraphQLFloat ,
239- description : null ,
240236 } ,
241237 {
242238 text : 'boolean' ,
243239 type : GraphQLBoolean ,
244- description : null ,
245240 } ,
246241 {
247242 text : 'id' ,
248243 type : GraphQLID ,
249- description : null ,
250244 } ,
251245 {
252246 text : 'enum' ,
253247 type : TestEnum ,
254- description : null ,
255248 } ,
256249 {
257250 text : 'object' ,
258251 type : TestInputObject ,
259- description : null ,
260252 } ,
261253 {
262254 text : 'listString' ,
263255 type : new GraphQLList ( GraphQLString ) ,
264- description : null ,
265256 } ,
266257 {
267258 text : 'listInt' ,
268259 type : new GraphQLList ( GraphQLInt ) ,
269- description : null ,
270260 } ,
271261 {
272262 text : 'listFloat' ,
273263 type : new GraphQLList ( GraphQLFloat ) ,
274- description : null ,
275264 } ,
276265 {
277266 text : 'listBoolean' ,
278267 type : new GraphQLList ( GraphQLBoolean ) ,
279- description : null ,
280268 } ,
281269 {
282270 text : 'listID' ,
283271 type : new GraphQLList ( GraphQLID ) ,
284- description : null ,
285272 } ,
286273 {
287274 text : 'listEnum' ,
288275 type : new GraphQLList ( TestEnum ) ,
289- description : null ,
290276 } ,
291277 {
292278 text : 'listObject' ,
293279 type : new GraphQLList ( TestInputObject ) ,
294- description : null ,
295280 } ,
296281 ] ;
297282 const expectedSuggestions = getExpectedSuggestions ( list ) ;
@@ -307,12 +292,10 @@ describe('graphql-hint', () => {
307292 {
308293 text : 'float' ,
309294 type : GraphQLFloat ,
310- description : null ,
311295 } ,
312296 {
313297 text : 'listFloat' ,
314298 type : new GraphQLList ( GraphQLFloat ) ,
315- description : null ,
316299 } ,
317300 ] ;
318301 const expectedSuggestions = getExpectedSuggestions ( list ) ;
@@ -328,72 +311,58 @@ describe('graphql-hint', () => {
328311 {
329312 text : 'string' ,
330313 type : GraphQLString ,
331- description : null ,
332314 } ,
333315 {
334316 text : 'int' ,
335317 type : GraphQLInt ,
336- description : null ,
337318 } ,
338319 {
339320 text : 'float' ,
340321 type : GraphQLFloat ,
341- description : null ,
342322 } ,
343323 {
344324 text : 'boolean' ,
345325 type : GraphQLBoolean ,
346- description : null ,
347326 } ,
348327 {
349328 text : 'id' ,
350329 type : GraphQLID ,
351- description : null ,
352330 } ,
353331 {
354332 text : 'enum' ,
355333 type : TestEnum ,
356- description : null ,
357334 } ,
358335 {
359336 text : 'object' ,
360337 type : TestInputObject ,
361- description : null ,
362338 } ,
363339 {
364340 text : 'listString' ,
365341 type : new GraphQLList ( GraphQLString ) ,
366- description : null ,
367342 } ,
368343 {
369344 text : 'listInt' ,
370345 type : new GraphQLList ( GraphQLInt ) ,
371- description : null ,
372346 } ,
373347 {
374348 text : 'listFloat' ,
375349 type : new GraphQLList ( GraphQLFloat ) ,
376- description : null ,
377350 } ,
378351 {
379352 text : 'listBoolean' ,
380353 type : new GraphQLList ( GraphQLBoolean ) ,
381- description : null ,
382354 } ,
383355 {
384356 text : 'listID' ,
385357 type : new GraphQLList ( GraphQLID ) ,
386- description : null ,
387358 } ,
388359 {
389360 text : 'listEnum' ,
390361 type : new GraphQLList ( TestEnum ) ,
391- description : null ,
392362 } ,
393363 {
394364 text : 'listObject' ,
395365 type : new GraphQLList ( TestInputObject ) ,
396- description : null ,
397366 } ,
398367 ] ;
399368 const expectedSuggestions = getExpectedSuggestions ( list ) ;
@@ -799,6 +768,7 @@ describe('graphql-hint', () => {
799768 text : '__typename' ,
800769 type : GraphQLNonNull ( GraphQLString ) ,
801770 description : 'The name of the current Object type at runtime.' ,
771+ isDeprecated : false ,
802772 } ,
803773 ] ;
804774 const expectedSuggestions = getExpectedSuggestions ( list ) ;
@@ -825,6 +795,7 @@ describe('graphql-hint', () => {
825795 text : '__typename' ,
826796 type : GraphQLNonNull ( GraphQLString ) ,
827797 description : 'The name of the current Object type at runtime.' ,
798+ isDeprecated : false ,
828799 } ,
829800 ] ;
830801 const expectedSuggestions = getExpectedSuggestions ( list ) ;
0 commit comments