All Downloads are FREE. Search and download functionalities are using the official Maven repository.

caliban.relay.Cursor.scala Maven / Gradle / Ivy

The newest version!
package caliban.relay

/**
 * A trait representing an abstract Relay Connection cursor.
 */
trait Cursor[A] {
  type T
  def encode(a: A): String
  def decode(s: String): Either[String, A]
  def value(cursor: A): T
}

object Cursor {
  def apply[A](implicit c: Cursor[A]): Cursor[A] = c
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy