Skip to content

Commit 0bb2853

Browse files
author
Johan ROUVE
committed
Add test on generated schema
1 parent e98d1df commit 0bb2853

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/test/kotlin/graphql/kickstart/tools/EndToEndTest.kt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,21 @@ class EndToEndTest {
532532
assertEquals(data["dataFetcherResult"], mapOf("name" to "item1"))
533533
}
534534

535+
@Test
536+
fun `generated schema supports list of DataFetcherResult`() {
537+
val data = assertNoGraphQlErrors(gql) {
538+
"""
539+
{
540+
dataFetcherResultItems {
541+
name
542+
}
543+
}
544+
"""
545+
}
546+
547+
assertEquals(data["dataFetcherResultItems"], listOf(mapOf("name" to "item1")))
548+
}
549+
535550
@Test
536551
fun `generated schema supports Kotlin suspend functions`() {
537552
val data = assertNoGraphQlErrors(gql) {

0 commit comments

Comments
 (0)