Skip to content

Commit

Permalink
Add ArgBuilders for Seq, Set and Vector (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
javimartinez committed Mar 31, 2020
1 parent 49e7d2a commit 657807a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/main/scala/caliban/schema/ArgBuilder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ object ArgBuilder {
case other => ev.build(other).map(List(_))
}

implicit def seq[A](implicit ev: ArgBuilder[A]): ArgBuilder[Seq[A]] = list[A].map(_.toSeq)
implicit def set[A](implicit ev: ArgBuilder[A]): ArgBuilder[Set[A]] = list[A].map(_.toSet)
implicit def vector[A](implicit ev: ArgBuilder[A]): ArgBuilder[Vector[A]] = list[A].map(_.toVector)

type EitherExecutionError[A] = Either[ExecutionError, A]

implicit val eitherMonadic: Monadic[EitherExecutionError] = new Monadic[EitherExecutionError] {
Expand Down

0 comments on commit 657807a

Please sign in to comment.