-
Notifications
You must be signed in to change notification settings - Fork 221
Open
Description
Hello there, I'm trying to eliminate the need for the Future with the functionality described here: #987. However, I'm encountering a lot of ambiguity errors in places where F[X] is used. The implicit conversion in the AsyncValue object is attempting to convert the types to LeafAction. Please see the errors above for more details. Do you have any advice on how to address this ambiguity? Thanks!
[error] 133 | parentPrice <- fs2.Stream.eval(collection(ctx).findById(parentId).compile.toList.map(_.headOption))
[error] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[error] |Found: F[List[O2]]
[error] |Required: ?{ map: ? }
[error] |
[error] |where: F is a type in class PriceDictionary with bounds <: [_] =>> Any
[error] | O2 is a type variable with constraint >: model.TreeElement[model.PriceItem]
[error] |
[error] |Note that implicit extension methods cannot be applied because they are ambiguous;
[error] |both method asyncAction in object AsyncValue and method toFunctorOps in trait ToFunctorOps provide an extension method `map` on (fs2.Stream.CompileOps[[x] =>> F[x], [x] =>> F[x], O2]#toList : => F[List[O2]])
[error] 86 | (for {
[error] 87 | user <- c.ctx.om.mongo.users
[error] 88 | .findOne(or(equal("email", email), equal("login", email)))
[error] 89 | .compile
[error] 90 | .toList
[error] 91 | .map(_.headOption)
[error] 92 | } yield user match {
[error] 93 | case Some(u) => checkAuthContext(u, c.arg(Context))(process(_))
[error] 94 | case _ => failForm[UserPassport]("email", messages("om.auth.violation.notfound"))
[error] 95 | }).flatten
[error] | ^
[error] |value flatten is not a member of sangria.schema.LeafAction[Nothing, F[auth.UserPassport]], but could be made available as an extension method.
Metadata
Metadata
Assignees
Labels
No labels