@@ -8,10 +8,10 @@ import {
88 upperFirst ,
99 ObjectTypeComposer ,
1010 EnumTypeComposer ,
11- type ComposeFieldConfigMap ,
12- type ComposeFieldConfigArgumentMap ,
13- type ComposeArgumentConfig ,
14- type ComposeArgumentConfigAsObject ,
11+ type ObjectTypeComposerFieldConfigMapDefinition ,
12+ type ObjectTypeComposerArgumentConfigMapDefinition ,
13+ type ObjectTypeComposerArgumentConfigDefinition ,
14+ type ObjectTypeComposerArgumentConfigAsObjectDefinition ,
1515} from 'graphql-compose' ;
1616import { reorderKeys } from './utils' ;
1717
@@ -252,7 +252,7 @@ export default class ElasticApiParser {
252252 return result ;
253253 }
254254
255- generateFieldMap ( ) : ComposeFieldConfigMap < any , any > {
255+ generateFieldMap ( ) : ObjectTypeComposerFieldConfigMapDefinition < any , any > {
256256 const result = { } ;
257257 Object . keys ( this . parsedSource ) . forEach ( methodName => {
258258 result [ methodName ] = this . generateFieldConfig ( methodName ) ;
@@ -316,8 +316,8 @@ export default class ElasticApiParser {
316316 paramCfg : ElasticParamConfigT ,
317317 fieldName : string ,
318318 description ?: ?string
319- ) : ComposeArgumentConfig {
320- const result : { ...ComposeArgumentConfigAsObject } = {
319+ ) : ObjectTypeComposerArgumentConfigDefinition {
320+ const result : { ...ObjectTypeComposerArgumentConfigAsObjectDefinition } = {
321321 type : this . paramTypeToGraphQL ( paramCfg , fieldName ) ,
322322 } ;
323323
@@ -377,7 +377,7 @@ export default class ElasticApiParser {
377377 }
378378 }
379379
380- getEnumType ( fieldName : string , vals : mixed [ ] ) : EnumTypeComposer < any > {
380+ getEnumType ( fieldName : string , vals : $ReadOnlyArray < any > ) : EnumTypeComposer < any > {
381381 const key = fieldName ;
382382 const subKey = JSON . stringify ( vals ) ;
383383
@@ -423,7 +423,7 @@ export default class ElasticApiParser {
423423 settingsToArgMap (
424424 settings : ?ElasticCaSettingsT ,
425425 descriptions : ElasticParsedArgsDescriptionsT = { }
426- ) : ComposeFieldConfigArgumentMap < any > {
426+ ) : ObjectTypeComposerArgumentConfigMapDefinition < any > {
427427 const result = { } ;
428428 const { params, urls, url, method, needBody } = settings || { } ;
429429
@@ -460,7 +460,9 @@ export default class ElasticApiParser {
460460 return result ;
461461 }
462462
463- reassembleNestedFields ( fields : ComposeFieldConfigMap < any , any > ) : ComposeFieldConfigMap < any , any > {
463+ reassembleNestedFields (
464+ fields : ObjectTypeComposerFieldConfigMapDefinition < any , any >
465+ ) : ObjectTypeComposerFieldConfigMapDefinition < any , any > {
464466 const result = { } ;
465467 Object . keys ( fields ) . forEach ( k => {
466468 const names = k . split ( '.' ) ;
0 commit comments