@@ -3,6 +3,7 @@ package com.expedia.graphql.generator.types
33import com.expedia.graphql.annotations.GraphQLContext
44import com.expedia.graphql.annotations.GraphQLDescription
55import com.expedia.graphql.annotations.GraphQLDirective
6+ import com.expedia.graphql.annotations.GraphQLIgnore
67import com.expedia.graphql.execution.FunctionDataFetcher
78import graphql.Scalars
89import graphql.introspection.Introspection
@@ -52,6 +53,8 @@ internal class FunctionBuilderTest : TypeTestHelper() {
5253
5354 fun context (@GraphQLContext context : String , string : String ) = " $context and $string "
5455
56+ fun ignoredParameter (color : String , @GraphQLIgnore ignoreMe : String ) = " $color and $ignoreMe "
57+
5558 fun completableFuture (num : Int ): CompletableFuture <Int > = CompletableFuture .completedFuture(num)
5659
5760 fun dataFetchingEnvironment (environment : DataFetchingEnvironment ): String = environment.field.name
@@ -128,6 +131,17 @@ internal class FunctionBuilderTest : TypeTestHelper() {
128131 assertEquals(expected = " string" , actual = arg?.name)
129132 }
130133
134+ @Test
135+ fun `Test ignored parameter` () {
136+ val kFunction = Happy ::ignoredParameter
137+ val result = builder.function(kFunction)
138+
139+ assertTrue(result.directives.isEmpty())
140+ assertEquals(expected = 1 , actual = result.arguments.size)
141+ val arg = result.arguments.firstOrNull()
142+ assertEquals(expected = " color" , actual = arg?.name)
143+ }
144+
131145 @Test
132146 fun `Non-abstract function` () {
133147 val kFunction = MyInterface ::printMessage
0 commit comments