File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
src/main/kotlin/com/coxautodev/graphql/tools Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import graphql.language.TypeName
13
13
import graphql.schema.DataFetcher
14
14
import graphql.schema.DataFetchingEnvironment
15
15
import graphql.schema.GraphQLTypeUtil.*
16
- import kotlinx.coroutines.GlobalScope
17
16
import kotlinx.coroutines.future.future
18
17
import java.lang.reflect.Method
19
18
import java.util.Comparator
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import graphql.language.ObjectTypeExtensionDefinition
8
8
import graphql.language.Type
9
9
import graphql.schema.DataFetchingEnvironment
10
10
import kotlinx.coroutines.CoroutineScope
11
- import kotlinx.coroutines.GlobalScope
11
+ import kotlinx.coroutines.Dispatchers
12
12
import java.lang.reflect.Method
13
13
import java.lang.reflect.ParameterizedType
14
14
import java.lang.reflect.Proxy
@@ -44,7 +44,7 @@ internal fun JavaType.unwrap(): Class<out Any> =
44
44
45
45
internal fun DataFetchingEnvironment.coroutineScope (): CoroutineScope {
46
46
val context: Any? = this .getContext()
47
- return if (context is CoroutineScope ) context else GlobalScope
47
+ return if (context is CoroutineScope ) context else CoroutineScope ( Dispatchers . Default )
48
48
}
49
49
50
50
internal val Class <* >.declaredNonProxyMethods: List <JavaMethod >
You can’t perform that action at this time.
0 commit comments