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

Commit

Permalink
Example for #41
Browse files Browse the repository at this point in the history
  • Loading branch information
Pawel Gutkowski committed Jan 10, 2019
1 parent 780eda8 commit 42fef4a
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import com.github.pgutkowski.kgraphql.extract
import com.github.pgutkowski.kgraphql.schema.introspection.TypeKind
import com.github.pgutkowski.kgraphql.schema.scalar.StringScalarCoercion
import com.github.pgutkowski.kgraphql.schema.structure2.Field
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import org.hamcrest.CoreMatchers
import org.hamcrest.CoreMatchers.equalTo
Expand Down Expand Up @@ -495,4 +496,17 @@ class SchemaBuilderTest {

checkSixValuesSchema(schema)
}

@Test
fun `client code can specify couroutine dispatcher for execution engine`(){
defaultSchema {
configure {
coroutineDispatcher = Dispatchers.Main
}

query("test") {
resolver { -> "test"}
}
}
}
}

0 comments on commit 42fef4a

Please sign in to comment.