Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 42fef4a

Browse files
author
Pawel Gutkowski
committed
Example for #41
1 parent 780eda8 commit 42fef4a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/test/kotlin/com/github/pgutkowski/kgraphql/schema/SchemaBuilderTest.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import com.github.pgutkowski.kgraphql.extract
1414
import com.github.pgutkowski.kgraphql.schema.introspection.TypeKind
1515
import com.github.pgutkowski.kgraphql.schema.scalar.StringScalarCoercion
1616
import com.github.pgutkowski.kgraphql.schema.structure2.Field
17+
import kotlinx.coroutines.Dispatchers
1718
import kotlinx.coroutines.delay
1819
import org.hamcrest.CoreMatchers
1920
import org.hamcrest.CoreMatchers.equalTo
@@ -495,4 +496,17 @@ class SchemaBuilderTest {
495496

496497
checkSixValuesSchema(schema)
497498
}
499+
500+
@Test
501+
fun `client code can specify couroutine dispatcher for execution engine`(){
502+
defaultSchema {
503+
configure {
504+
coroutineDispatcher = Dispatchers.Main
505+
}
506+
507+
query("test") {
508+
resolver { -> "test"}
509+
}
510+
}
511+
}
498512
}

0 commit comments

Comments
 (0)