Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Question: Coroutine drawbacks in resolvers and recommended implementation? #321

Closed
@bsara

Description

@bsara

I noticed that graphql-java-tools supports coroutines (suspend functions) in resolvers and was curious of two things:

  1. are there any potential drawbacks to using suspend over a normal CompletableFuture.supplyAsync in query/type resolvers? (it seems to use GlobalScope which, the Kotlin docs make sound like should be avoided in most cases, but I'm still working on understanding it fully)
  2. is there a recommended implementation for using suspend functions in query/type resolvers? (like providing your own coroutine context or just allowing the default, etc.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions