Skip to content

Commit bc6dedb

Browse files
authored
Merge pull request #316 from vojtapol/294-handle-optional-parameters
294 handle optional parameters fix tests
2 parents b24fc4c + 8422dc3 commit bc6dedb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/kotlin/com/coxautodev/graphql/tools/EndToEndSpecHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class Query : GraphQLQueryResolver, ListListResolver<String>() {
259259
}
260260

261261
fun itemsWithOptionalInput(input: ItemSearchInput?) = if (input == null) items else items(input)
262-
fun itemsWithOptionalInputExplicit(input: Optional<ItemSearchInput>) = if (input.isPresent) items(input.get()) else items
262+
fun itemsWithOptionalInputExplicit(input: Optional<ItemSearchInput>?) = if (input?.isPresent == true) items(input.get()) else items
263263
fun enumInputType(type: Type) = type
264264
fun customScalarMapInputType(customScalarMap: Map<String, Any>) = customScalarMap
265265
fun itemWithGenericProperties() = ItemWithGenericProperties(listOf("A", "B"))

0 commit comments

Comments
 (0)