diff --git a/modules/cats-effect-experimental/src/test/scala/sangria/catseffect/IOExecutionSchemeSpec.scala b/modules/cats-effect-experimental/src/test/scala/sangria/catseffect/IOExecutionSchemeSpec.scala index 4024bc42..21471572 100644 --- a/modules/cats-effect-experimental/src/test/scala/sangria/catseffect/IOExecutionSchemeSpec.scala +++ b/modules/cats-effect-experimental/src/test/scala/sangria/catseffect/IOExecutionSchemeSpec.scala @@ -62,8 +62,20 @@ object IOExecutionSchemeSpec { () => fields[Unit, Unit]( Field("ids", ListType(IntType), resolve = _ => List(1, 2)), - Field("parent", StringType, resolve = _ => IO("hello")) - )) + Field( + "parent", + StringType, + resolve = { _ => + (for { + value <- IO(Option("hello")) + } yield value match { + case Some(value) => IO.pure(value) + case None => IO.raiseError(new Exception("No value")) + }).flatten: IO[String] + } + ) + ) + ) private val schema = Schema(QueryType) }