package Ġgraphql . n adel . validation . util Ċ Ċ import Ġgraphql . language . Field Definition Ċ import Ġgraphql . n adel . Service Ċ import Ġgraphql . n adel . dsl . Extended Field Definition Ċ import Ġgraphql . n adel . dsl . Field Mapping Definition Ċ import Ġgraphql . n adel . dsl . Under lying Service H yd ration Ċ import Ġgraphql . n adel . engine kt . util . unwrap All Ċ import Ġgraphql . n adel . schema . N adel Directives Ċ import Ġgraphql . n adel . util . Util Ċ import Ġgraphql . schema . GraphQL Field Definition Ċ import Ġgraphql . schema . GraphQL Named Type Ċ import Ġgraphql . schema . GraphQL Schema Ċ import Ġgraphql . schema . GraphQL Type Ċ Ċ object ĠN adel Schema Util Ġ{ ĊĠĠĠ Ġfun Ġget Under lying Type ( overall Type : ĠGraphQL Named Type , Ġservice : ĠService ): ĠGraphQL Type ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġservice . underlying Schema . getType ( get Rename d From ( overall Type ) Ġ?: Ġoverall Type . name ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Hy dr ations ( field : ĠGraphQL Field Definition , Ġoverall Schema : ĠGraphQL Schema ): ĠList < Under lying Service H yd ration > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġdef Ġ= Ġfield . definition ĊĠĠĠĠĠĠĠ Ġif Ġ( def Ġis ĠExtended Field Definition ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġunderlying Service H yd ration Ġ= Ġdef . field Transformation ?. underlying Service H yd ration Ġ?: Ġreturn Ġempty List () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĠlistOf ( underlying Service H yd ration ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn ĠN adel Directives . create Under lying Service H yd ration ( field , Ġoverall Schema ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġhas H yd ration ( field : ĠGraphQL Field Definition ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġhas H yd ration ( field . definition ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġhas H yd ration ( def : ĠField Definition ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( def Ġis ĠExtended Field Definition ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġdef . field Transformation ?. underlying Service H yd ration Ġ!= Ġnull ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġval Ġhy dr ated Present Ġ= Ġdef . has Directive ( N adel Directives . HY DR ATED _ DIRECT IVE _ DEFINITION . name ) ĊĠĠĠĠĠĠĠ Ġval Ġhy dr ated From Present Ġ= Ġdef . has Directive ( N adel Directives . HY DR ATED _ FROM _ DIRECT IVE _ DEFINITION . name ) ĊĠĠĠĠĠĠĠ Ġreturn Ġhy dr ated Present Ġ|| Ġhy dr ated From Present ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Rename ( field : ĠGraphQL Field Definition ): ĠField Mapping Definition ? Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġdef Ġ= Ġfield . definition ĊĠĠĠĠĠĠĠ Ġif Ġ( def Ġis ĠExtended Field Definition ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġdef . field Transformation ?. field Mapping Definition ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn ĠN adel Directives . create Field Mapping ( field ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġhas Rename ( field : ĠGraphQL Field Definition ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġhas Rename ( field . definition ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġhas Rename ( def : ĠField Definition ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( def Ġis ĠExtended Field Definition ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġdef . field Transformation ?. field Mapping Definition Ġ!= Ġnull ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn Ġdef . has Directive ( N adel Directives . RE NAMED _ DIRECT IVE _ DEFINITION . name ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Under lying Name ( type : ĠGraphQL Named Type ): ĠString Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġget Rename d From ( type ) Ġ?: Ġtype . name ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Rename d From ( type : ĠGraphQL Named Type ): ĠString ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠUtil . getType Mapping Definition For ( type . unwrap All ()) ?. underlying Name ĊĠĠĠ Ġ} Ċ } Ċ