Created
August 9, 2022 10:06
-
-
Save kirillsalykin/38fd46215888baef257965a94e6cd4a1 to your computer and use it in GitHub Desktop.
caliban_example_error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/kirill/playground/zio-quickstart-graphql-webservice/src/main/scala/dev/zio/quickstart/ExampleApi.scala:45:6 | |
Cannot find a Schema for type dev.zio.quickstart.ExampleData.CharactersArgs => | |
zio².URIO[dev.zio.quickstart.ExampleService.ExampleService, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
where: zio is a package in package dev | |
zio² is a package | |
. | |
Caliban derives a Schema automatically for basic Scala types, case classes and sealed traits, but | |
you need to manually provide an implicit Schema for other types that could be nested in dev.zio.quickstart.ExampleData.CharactersArgs => | |
zio².URIO[dev.zio.quickstart.ExampleService.ExampleService, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
where: zio is a package in package dev | |
zio² is a package | |
. | |
If you use a custom type as an argument, you also need to provide an implicit ArgBuilder for that type. | |
See https://ghostdogpr.github.io/caliban/docs/schema.html for more information. | |
. | |
I found: | |
dev.zio.quickstart.ExampleApi.functionSchema[RA, Any, | |
dev.zio.quickstart.ExampleData.CharactersArgs | |
, | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
]( | |
{ | |
val $scrutinee98: | |
( | |
deriving.Mirror{ | |
MirroredType = dev.zio.quickstart.ExampleData.CharactersArgs; | |
MirroredMonoType = dev.zio.quickstart.ExampleData.CharactersArgs | |
; MirroredElemTypes <: Tuple | |
} | |
& | |
scala.deriving.Mirror.Product{ | |
MirroredMonoType = dev.zio.quickstart.ExampleData.CharactersArgs; | |
MirroredType = dev.zio.quickstart.ExampleData.CharactersArgs | |
; MirroredLabel = ("CharactersArgs" : String) | |
} | |
){ | |
MirroredElemTypes = Option[dev.zio.quickstart.ExampleData.Origin] *: | |
EmptyTuple.type | |
; MirroredElemLabels = ("origin" : String) *: EmptyTuple.type | |
} | |
= | |
dev.zio.quickstart.ExampleData.CharactersArgs.$asInstanceOf[ | |
( | |
deriving.Mirror{ | |
MirroredType = dev.zio.quickstart.ExampleData.CharactersArgs; | |
MirroredMonoType = dev.zio.quickstart.ExampleData.CharactersArgs | |
; MirroredElemTypes <: Tuple | |
} | |
& | |
scala.deriving.Mirror.Product{ | |
MirroredMonoType = dev.zio.quickstart.ExampleData.CharactersArgs; | |
MirroredType = dev.zio.quickstart.ExampleData.CharactersArgs | |
; MirroredLabel = ("CharactersArgs" : String) | |
} | |
){ | |
MirroredElemTypes = Option[dev.zio.quickstart.ExampleData.Origin] *: | |
EmptyTuple.type; | |
MirroredElemLabels = ("origin" : String) *: EmptyTuple.type | |
} | |
] | |
val m: | |
( | |
deriving.Mirror{ | |
MirroredType = dev.zio.quickstart.ExampleData.CharactersArgs; | |
MirroredMonoType = dev.zio.quickstart.ExampleData.CharactersArgs | |
; MirroredElemTypes <: Tuple | |
} | |
& | |
scala.deriving.Mirror.Product{ | |
MirroredMonoType = dev.zio.quickstart.ExampleData.CharactersArgs; | |
MirroredType = dev.zio.quickstart.ExampleData.CharactersArgs | |
; MirroredLabel = ("CharactersArgs" : String) | |
} | |
){ | |
MirroredElemTypes = Option[dev.zio.quickstart.ExampleData.Origin] *: | |
EmptyTuple.type | |
; MirroredElemLabels = ("origin" : String) *: EmptyTuple.type | |
} | |
= $scrutinee98 | |
lazy val fields: List[(String, List[Any], caliban.schema.ArgBuilder[Any])] | |
= | |
{ | |
val label: String = "origin".toString() | |
val annotations: List[Any] = | |
List.apply[Any]( | |
[new SerialVersionUID(value = -114498752079829388L) : Any]* | |
):List[Any] | |
val builder: caliban.schema.ArgBuilder[Any] = | |
caliban.schema.ArgBuilder.option[dev.zio.quickstart.ExampleData.Origin]( | |
{ | |
val $scrutinee120: | |
( | |
deriving.Mirror{ | |
MirroredType = dev.zio.quickstart.ExampleData.Origin; | |
MirroredMonoType = dev.zio.quickstart.ExampleData.Origin | |
; MirroredElemTypes <: Tuple | |
} | |
& | |
scala.deriving.Mirror.Sum{ | |
MirroredMonoType = dev.zio.quickstart.ExampleData.Origin; | |
MirroredType = dev.zio.quickstart.ExampleData.Origin | |
; MirroredLabel = ("Origin" : String) | |
} | |
){ | |
MirroredElemTypes = ( | |
dev.zio.quickstart.ExampleData.Origin.EARTH.type | |
, dev.zio.quickstart.ExampleData.Origin.MARS.type, | |
dev.zio.quickstart.ExampleData.Origin.BELT.type | |
); | |
MirroredElemLabels = (("EARTH" : String), ("MARS" : String) | |
, | |
("BELT" : String)) | |
} | |
= | |
dev.zio.quickstart.ExampleData.Origin.$asInstanceOf[ | |
( | |
deriving.Mirror{ | |
MirroredType = dev.zio.quickstart.ExampleData.Origin; | |
MirroredMonoType = dev.zio.quickstart.ExampleData.Origin | |
; MirroredElemTypes <: Tuple | |
} | |
& | |
scala.deriving.Mirror.Sum{ | |
MirroredMonoType = dev.zio.quickstart.ExampleData.Origin; | |
MirroredType = dev.zio.quickstart.ExampleData.Origin | |
; MirroredLabel = ("Origin" : String) | |
} | |
){ | |
MirroredElemTypes = ( | |
dev.zio.quickstart.ExampleData.Origin.EARTH.type | |
, dev.zio.quickstart.ExampleData.Origin.MARS.type, | |
dev.zio.quickstart.ExampleData.Origin.BELT.type | |
); | |
MirroredElemLabels = (("EARTH" : String), | |
("MARS" : String) | |
, ("BELT" : String)) | |
} | |
] | |
val m: | |
( | |
deriving.Mirror{ | |
MirroredType = dev.zio.quickstart.ExampleData.Origin; | |
MirroredMonoType = dev.zio.quickstart.ExampleData.Origin | |
; MirroredElemTypes <: Tuple | |
} | |
& | |
scala.deriving.Mirror.Sum{ | |
MirroredMonoType = dev.zio.quickstart.ExampleData.Origin; | |
MirroredType = dev.zio.quickstart.ExampleData.Origin | |
; MirroredLabel = ("Origin" : String) | |
} | |
){ | |
MirroredElemTypes = ( | |
dev.zio.quickstart.ExampleData.Origin.EARTH.type | |
, dev.zio.quickstart.ExampleData.Origin.MARS.type, | |
dev.zio.quickstart.ExampleData.Origin.BELT.type | |
); | |
MirroredElemLabels = (("EARTH" : String), ("MARS" : String) | |
, | |
("BELT" : String)) | |
} | |
= $scrutinee120 | |
lazy val subTypes: | |
List[(String, List[Any], caliban.schema.ArgBuilder[Any])] | |
= | |
{ | |
val label: String = "EARTH".toString() | |
val annotations: List[Any] = Nil:List[Any] | |
val builder: caliban.schema.ArgBuilder[Any] = | |
( | |
{ | |
val $scrutinee122: | |
scala.deriving.Mirror.Singleton{ | |
MirroredMonoType = | |
dev.zio.quickstart.ExampleData.Origin.EARTH.type | |
; | |
MirroredType = | |
dev.zio.quickstart.ExampleData.Origin.EARTH.type | |
; MirroredLabel = ("EARTH" : String) | |
} | |
= | |
dev.zio.quickstart.ExampleData.Origin.EARTH. | |
$asInstanceOf | |
[ | |
scala.deriving.Mirror.Singleton{ | |
MirroredMonoType = | |
dev.zio.quickstart.ExampleData.Origin.EARTH.type | |
; | |
MirroredType = | |
dev.zio.quickstart.ExampleData.Origin.EARTH | |
.type | |
; MirroredLabel = ("EARTH" : String) | |
} | |
] | |
val m: | |
scala.deriving.Mirror.Singleton{ | |
MirroredMonoType = | |
dev.zio.quickstart.ExampleData.Origin.EARTH.type | |
; | |
MirroredType = | |
dev.zio.quickstart.ExampleData.Origin.EARTH.type | |
; MirroredLabel = ("EARTH" : String) | |
} | |
= $scrutinee122 | |
lazy val fields: | |
List[(String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
)] | |
= | |
Nil: | |
List[ | |
Tuple3[String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
] | |
] | |
lazy val annotations: Map[String, List[Any]] = | |
(Nil:List[Tuple2[String, List[Any]]]).to[ | |
Map[String, List[Any]] | |
]( | |
collection.MapFactory.toFactory[String, List[Any], Map | |
] | |
(Map) | |
) | |
{ | |
final class $anon() extends Object(), caliban.schema. | |
ArgBuilder | |
[dev.zio.quickstart.ExampleData.Origin.EARTH.type] { | |
def build(input: caliban.InputValue): | |
Either[caliban.CalibanError.ExecutionError, | |
dev.zio.quickstart.ExampleData.Origin.EARTH.type | |
] | |
= | |
fields.map[ | |
Either[caliban.CalibanError.ExecutionError, Any] | |
]( | |
{ | |
def $anonfun( | |
x$1: | |
(String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
) | |
): | |
Either[caliban.CalibanError.ExecutionError, | |
Any | |
] | |
= | |
{ | |
def label: String = x$1._1 | |
def _$2: List[Any] = x$1._2 | |
def builder: caliban.schema.ArgBuilder[Any] | |
= | |
x$1._3 | |
input match | |
{ | |
case | |
caliban.InputValue.ObjectValue( | |
fields @ _ | |
):caliban.InputValue.ObjectValue | |
=> | |
val finalLabel: String = | |
annotations.getOrElse[List[Any]]( | |
label | |
, Nil).collectFirst[String]( | |
{ | |
def $anonfun(x$1: Any): String | |
= | |
x$1:(x$1 : Any) @unchecked | |
match | |
{ | |
case | |
caliban.schema.Annotations. | |
GQLName | |
(name @ _): | |
caliban.schema.Annotations | |
. | |
GQLName | |
=> name:String | |
} | |
closure($anonfun: | |
PartialFunction[Any, String] | |
) | |
} | |
).getOrElse[String](label) | |
val default: Option[String] = | |
annotations.getOrElse[List[Any]]( | |
label | |
, Nil).collectFirst[String]( | |
{ | |
def $anonfun(x$1: Any): String | |
= | |
x$1:(x$1 : Any) @unchecked | |
match | |
{ | |
case | |
caliban.schema.Annotations. | |
GQLDefault | |
(v @ _): | |
caliban.schema.Annotations | |
. | |
GQLDefault | |
=> v:String | |
} | |
closure($anonfun: | |
PartialFunction[Any, String] | |
) | |
} | |
) | |
fields.get(finalLabel).fold[ | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
](builder.buildMissing(default))( | |
{ | |
val $1$: | |
caliban.schema.ArgBuilder[Any] | |
= builder | |
{ | |
def $anonfun( | |
input: caliban.InputValue | |
): | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
= $1$.build(input) | |
closure($anonfun) | |
} | |
} | |
) | |
case value @ _ => builder.build(value) | |
} | |
} | |
closure($anonfun) | |
} | |
).foldRight[ | |
Either[caliban.CalibanError.ExecutionError, Tuple] | |
](Right.apply[Nothing, EmptyTuple.type](EmptyTuple)) | |
( | |
{ | |
def $anonfun( | |
x$1: | |
Either[caliban.CalibanError.ExecutionError, | |
Any | |
] | |
, | |
x$2: | |
Either[caliban.CalibanError.ExecutionError, | |
Tuple | |
] | |
): | |
Either[caliban.CalibanError.ExecutionError, | |
Tuple | |
] | |
= | |
Tuple2.apply[ | |
Either[caliban.CalibanError.ExecutionError, | |
Any | |
] | |
, | |
Either[caliban.CalibanError.ExecutionError, | |
Tuple | |
] | |
](x$1, x$2) match | |
{ | |
case | |
Tuple2.unapply[ | |
Either[ | |
caliban.CalibanError.ExecutionError | |
, Any] | |
, | |
Either[ | |
caliban.CalibanError.ExecutionError | |
, Tuple] | |
](item @ _, acc @ _) | |
=> | |
item match | |
{ | |
case | |
error @ | |
_: | |
Left[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
=> | |
error.asInstanceOf[ | |
Left[ | |
caliban.CalibanError. | |
ExecutionError | |
, Tuple] | |
] | |
case | |
Right.unapply[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any](value @ _): | |
Right[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
=> | |
acc.map[Any *: Tuple]( | |
{ | |
def $anonfun(_$3: Tuple): | |
Any *: Tuple | |
= | |
{ | |
val Tuple_this: | |
(_$3 : Tuple) | |
= _$3 | |
runtime.Tuples.cons(value, | |
Tuple_this | |
).asInstanceOf[ | |
*:[Any, Tuple] | |
]:*:[Any, Tuple] | |
} | |
closure($anonfun) | |
} | |
) | |
} | |
} | |
closure($anonfun) | |
} | |
).map[ | |
dev.zio.quickstart.ExampleData.Origin.EARTH.type | |
]( | |
{ | |
def $anonfun(p: Product): | |
dev.zio.quickstart.ExampleData.Origin.EARTH | |
.type | |
= m.fromProduct(p) | |
closure($anonfun) | |
} | |
) | |
} | |
new $anon(): | |
caliban.schema.ArgBuilder[ | |
dev.zio.quickstart.ExampleData.Origin.EARTH.type | |
] | |
} | |
}: | |
caliban.schema.ArgBuilder[ | |
dev.zio.quickstart.ExampleData.Origin.EARTH.type | |
] | |
: | |
caliban.schema.ArgBuilder[ | |
dev.zio.quickstart.ExampleData.Origin.EARTH.type | |
] | |
).asInstanceOf[caliban.schema.ArgBuilder[Any]] | |
{ | |
val elem$1: | |
(String, List[Any], caliban.schema.ArgBuilder[Any]) | |
= | |
Tuple3.apply[String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
](label, annotations, builder) | |
( | |
{ | |
val label: String = "MARS".toString() | |
val annotations: List[Any] = Nil:List[Any] | |
val builder: caliban.schema.ArgBuilder[Any] = | |
( | |
{ | |
val $scrutinee125: | |
scala.deriving.Mirror.Singleton{ | |
MirroredMonoType = | |
dev.zio.quickstart.ExampleData.Origin.MARS | |
.type | |
; | |
MirroredType = | |
dev.zio.quickstart.ExampleData.Origin.MARS | |
.type | |
; MirroredLabel = ("MARS" : String) | |
} | |
= | |
dev.zio.quickstart.ExampleData.Origin.MARS. | |
$asInstanceOf | |
[ | |
scala.deriving.Mirror.Singleton{ | |
MirroredMonoType = | |
dev.zio.quickstart.ExampleData.Origin.MARS | |
.type | |
; | |
MirroredType = | |
dev.zio.quickstart.ExampleData.Origin. | |
MARS | |
.type | |
; MirroredLabel = ("MARS" : String) | |
} | |
] | |
val m: | |
scala.deriving.Mirror.Singleton{ | |
MirroredMonoType = | |
dev.zio.quickstart.ExampleData.Origin.MARS | |
.type | |
; | |
MirroredType = | |
dev.zio.quickstart.ExampleData.Origin.MARS | |
.type | |
; MirroredLabel = ("MARS" : String) | |
} | |
= $scrutinee125 | |
lazy val fields: | |
List[(String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
)] | |
= | |
Nil: | |
List[ | |
Tuple3[String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
] | |
] | |
lazy val annotations: Map[String, List[Any]] = | |
(Nil:List[Tuple2[String, List[Any]]]).to[ | |
Map[String, List[Any]] | |
]( | |
collection.MapFactory.toFactory[String, | |
List[Any] | |
, Map](Map) | |
) | |
{ | |
final class $anon() extends Object(), caliban. | |
schema | |
.ArgBuilder[ | |
dev.zio.quickstart.ExampleData.Origin.MARS.type | |
] { | |
def build(input: caliban.InputValue): | |
Either[caliban.CalibanError.ExecutionError, | |
dev.zio.quickstart.ExampleData.Origin.MARS | |
.type | |
] | |
= | |
fields.map[ | |
Either[caliban.CalibanError.ExecutionError | |
, | |
Any] | |
]( | |
{ | |
def $anonfun( | |
x$1: | |
(String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
) | |
): | |
Either[ | |
caliban.CalibanError.ExecutionError | |
, Any] | |
= | |
{ | |
def label: String = x$1._1 | |
def _$2: List[Any] = x$1._2 | |
def builder: | |
caliban.schema.ArgBuilder[Any] | |
= x$1._3 | |
input match | |
{ | |
case | |
caliban.InputValue.ObjectValue( | |
fields @ _ | |
):caliban.InputValue.ObjectValue | |
=> | |
val finalLabel: String = | |
annotations.getOrElse[ | |
List[Any] | |
](label, Nil).collectFirst[ | |
String | |
]( | |
{ | |
def $anonfun(x$1: Any): | |
String | |
= | |
x$1: | |
(x$1 : Any) @unchecked | |
match | |
{ | |
case | |
caliban.schema. | |
Annotations | |
.GQLName(name @ _) | |
: | |
caliban.schema.Annotations | |
. | |
GQLName | |
=> name:String | |
} | |
closure($anonfun: | |
PartialFunction[Any, | |
String | |
] | |
) | |
} | |
).getOrElse[String](label) | |
val default: Option[String] = | |
annotations.getOrElse[ | |
List[Any] | |
](label, Nil).collectFirst[ | |
String | |
]( | |
{ | |
def $anonfun(x$1: Any): | |
String | |
= | |
x$1: | |
(x$1 : Any) @unchecked | |
match | |
{ | |
case | |
caliban.schema. | |
Annotations | |
.GQLDefault(v @ _) | |
: | |
caliban.schema.Annotations | |
. | |
GQLDefault | |
=> v:String | |
} | |
closure($anonfun: | |
PartialFunction[Any, | |
String | |
] | |
) | |
} | |
) | |
fields.get(finalLabel).fold[ | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
](builder.buildMissing(default)) | |
( | |
{ | |
val $1$: | |
caliban.schema.ArgBuilder[ | |
Any | |
] | |
= builder | |
{ | |
def $anonfun( | |
input: caliban.InputValue | |
): | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
= $1$.build(input) | |
closure($anonfun) | |
} | |
} | |
) | |
case value @ _ => | |
builder.build(value) | |
} | |
} | |
closure($anonfun) | |
} | |
).foldRight[ | |
Either[caliban.CalibanError.ExecutionError, | |
Tuple | |
] | |
]( | |
Right.apply[Nothing, EmptyTuple.type]( | |
EmptyTuple | |
) | |
)( | |
{ | |
def $anonfun( | |
x$1: | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
, | |
x$2: | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Tuple] | |
): | |
Either[ | |
caliban.CalibanError.ExecutionError | |
, Tuple] | |
= | |
Tuple2.apply[ | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
, | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Tuple] | |
](x$1, x$2) match | |
{ | |
case | |
Tuple2.unapply[ | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
, | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Tuple] | |
](item @ _, acc @ _) | |
=> | |
item match | |
{ | |
case | |
error @ | |
_: | |
Left[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
=> | |
error.asInstanceOf[ | |
Left[ | |
caliban.CalibanError. | |
ExecutionError | |
, Tuple] | |
] | |
case | |
Right.unapply[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any](value @ _): | |
Right[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
=> | |
acc.map[Any *: Tuple]( | |
{ | |
def $anonfun(_$3: Tuple) | |
: | |
Any *: Tuple = | |
{ | |
val Tuple_this: | |
(_$3 : Tuple) | |
= _$3 | |
runtime.Tuples.cons( | |
value | |
, Tuple_this). | |
asInstanceOf | |
[*:[Any, Tuple]]: | |
*:[Any, Tuple] | |
} | |
closure($anonfun) | |
} | |
) | |
} | |
} | |
closure($anonfun) | |
} | |
).map[ | |
dev.zio.quickstart.ExampleData.Origin.MARS | |
.type | |
]( | |
{ | |
def $anonfun(p: Product): | |
dev.zio.quickstart.ExampleData.Origin. | |
MARS | |
.type | |
= m.fromProduct(p) | |
closure($anonfun) | |
} | |
) | |
} | |
new $anon(): | |
caliban.schema.ArgBuilder[ | |
dev.zio.quickstart.ExampleData.Origin.MARS | |
.type | |
] | |
} | |
}: | |
caliban.schema.ArgBuilder[ | |
dev.zio.quickstart.ExampleData.Origin.MARS.type | |
] | |
: | |
caliban.schema.ArgBuilder[ | |
dev.zio.quickstart.ExampleData.Origin.MARS.type | |
] | |
).asInstanceOf[caliban.schema.ArgBuilder[Any]] | |
{ | |
val elem$1: | |
(String, List[Any], caliban.schema.ArgBuilder[Any]) | |
= | |
Tuple3.apply[String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
](label, annotations, builder) | |
( | |
{ | |
val label: String = "BELT".toString() | |
val annotations: List[Any] = Nil:List[Any] | |
val builder: caliban.schema.ArgBuilder[Any] = | |
( | |
{ | |
val $scrutinee128: | |
scala.deriving.Mirror.Singleton{ | |
MirroredMonoType = | |
dev.zio.quickstart.ExampleData.Origin. | |
BELT | |
.type | |
; | |
MirroredType = | |
dev.zio.quickstart.ExampleData.Origin | |
. | |
BELT.type | |
; MirroredLabel = ("BELT" : String) | |
} | |
= | |
dev.zio.quickstart.ExampleData.Origin.BELT. | |
$asInstanceOf | |
[ | |
scala.deriving.Mirror.Singleton{ | |
MirroredMonoType = | |
dev.zio.quickstart.ExampleData.Origin | |
. | |
BELT.type | |
; | |
MirroredType = | |
dev.zio.quickstart.ExampleData.Origin | |
. | |
BELT.type | |
; MirroredLabel = ("BELT" : String) | |
} | |
] | |
val m: | |
scala.deriving.Mirror.Singleton{ | |
MirroredMonoType = | |
dev.zio.quickstart.ExampleData.Origin. | |
BELT | |
.type | |
; | |
MirroredType = | |
dev.zio.quickstart.ExampleData.Origin | |
. | |
BELT.type | |
; MirroredLabel = ("BELT" : String) | |
} | |
= $scrutinee128 | |
lazy val fields: | |
List[(String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
)] | |
= | |
Nil: | |
List[ | |
Tuple3[String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
] | |
] | |
lazy val annotations: Map[String, List[Any]] | |
= | |
(Nil:List[Tuple2[String, List[Any]]]).to[ | |
Map[String, List[Any]] | |
]( | |
collection.MapFactory.toFactory[String, | |
List[Any] | |
, Map](Map) | |
) | |
{ | |
final class $anon() extends Object(), | |
caliban | |
.schema.ArgBuilder[ | |
dev.zio.quickstart.ExampleData.Origin. | |
BELT | |
.type | |
] { | |
def build(input: caliban.InputValue): | |
Either[ | |
caliban.CalibanError.ExecutionError | |
, | |
dev.zio.quickstart.ExampleData.Origin | |
. | |
BELT.type | |
] | |
= | |
fields.map[ | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
]( | |
{ | |
def $anonfun( | |
x$1: | |
(String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
) | |
): | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
= | |
{ | |
def label: String = x$1._1 | |
def _$2: List[Any] = x$1._2 | |
def builder: | |
caliban.schema.ArgBuilder[Any] | |
= x$1._3 | |
input match | |
{ | |
case | |
caliban.InputValue. | |
ObjectValue | |
(fields @ _): | |
caliban.InputValue. | |
ObjectValue | |
=> | |
val finalLabel: String = | |
annotations.getOrElse[ | |
List[Any] | |
](label, Nil). | |
collectFirst | |
[String]( | |
{ | |
def $anonfun( | |
x$1: Any | |
): String = | |
x$1: | |
(x$1 : Any) | |
@unchecked | |
match | |
{ | |
case | |
caliban. | |
schema | |
.Annotations | |
. | |
GQLName( | |
name @ _ | |
): | |
caliban.schema.Annotations | |
. | |
GQLName | |
=> | |
name:String | |
} | |
closure($anonfun: | |
PartialFunction[ | |
Any | |
, String] | |
) | |
} | |
).getOrElse[String]( | |
label | |
) | |
val default: | |
Option[String] | |
= | |
annotations.getOrElse[ | |
List[Any] | |
](label, Nil). | |
collectFirst | |
[String]( | |
{ | |
def $anonfun( | |
x$1: Any | |
): String = | |
x$1: | |
(x$1 : Any) | |
@unchecked | |
match | |
{ | |
case | |
caliban. | |
schema | |
.Annotations | |
. | |
GQLDefault( | |
v @ _ | |
): | |
caliban.schema.Annotations | |
. | |
GQLDefault | |
=> v:String | |
} | |
closure($anonfun: | |
PartialFunction[ | |
Any | |
, String] | |
) | |
} | |
) | |
fields.get(finalLabel). | |
fold | |
[ | |
Either[ | |
caliban.CalibanError | |
. | |
ExecutionError | |
, Any] | |
]( | |
builder.buildMissing( | |
default | |
) | |
)( | |
{ | |
val $1$: | |
caliban.schema. | |
ArgBuilder | |
[Any] | |
= builder | |
{ | |
def $anonfun( | |
input: | |
caliban. | |
InputValue | |
): | |
Either[ | |
caliban. | |
CalibanError | |
. | |
ExecutionError | |
, Any] | |
= $1$.build(input) | |
closure($anonfun) | |
} | |
} | |
) | |
case value @ _ => | |
builder.build(value) | |
} | |
} | |
closure($anonfun) | |
} | |
).foldRight[ | |
Either[ | |
caliban.CalibanError.ExecutionError | |
, Tuple] | |
]( | |
Right.apply[Nothing, EmptyTuple.type]( | |
EmptyTuple | |
) | |
)( | |
{ | |
def $anonfun( | |
x$1: | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
, | |
x$2: | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Tuple] | |
): | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Tuple] | |
= | |
Tuple2.apply[ | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
, | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Tuple] | |
](x$1, x$2) match | |
{ | |
case | |
Tuple2.unapply[ | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Any] | |
, | |
Either[ | |
caliban.CalibanError. | |
ExecutionError | |
, Tuple] | |
](item @ _, acc @ _) | |
=> | |
item match | |
{ | |
case | |
error @ | |
_: | |
Left[ | |
caliban. | |
CalibanError | |
.ExecutionError | |
, Any] | |
=> | |
error.asInstanceOf[ | |
Left[ | |
caliban. | |
CalibanError | |
.ExecutionError | |
, Tuple] | |
] | |
case | |
Right.unapply[ | |
caliban. | |
CalibanError | |
.ExecutionError | |
, Any](value @ _): | |
Right[ | |
caliban. | |
CalibanError | |
.ExecutionError | |
, Any] | |
=> | |
acc.map[Any *: Tuple]( | |
{ | |
def $anonfun( | |
_$3: Tuple | |
): Any *: Tuple = | |
{ | |
val Tuple_this | |
: | |
(_$3 : Tuple) | |
= | |
_$3 | |
runtime.Tuples | |
. | |
cons(value, | |
Tuple_this | |
).asInstanceOf | |
[ | |
*:[Any, Tuple] | |
] | |
: | |
*:[Any, | |
Tuple | |
] | |
} | |
closure($anonfun) | |
} | |
) | |
} | |
} | |
closure($anonfun) | |
} | |
).map[ | |
dev.zio.quickstart.ExampleData.Origin | |
. | |
BELT.type | |
]( | |
{ | |
def $anonfun(p: Product): | |
dev.zio.quickstart.ExampleData.Origin | |
. | |
BELT.type | |
= m.fromProduct(p) | |
closure($anonfun) | |
} | |
) | |
} | |
new $anon(): | |
caliban.schema.ArgBuilder[ | |
dev.zio.quickstart.ExampleData.Origin. | |
BELT | |
.type | |
] | |
} | |
}: | |
caliban.schema.ArgBuilder[ | |
dev.zio.quickstart.ExampleData.Origin.BELT | |
.type | |
] | |
: | |
caliban.schema.ArgBuilder[ | |
dev.zio.quickstart.ExampleData.Origin.BELT | |
.type | |
] | |
).asInstanceOf[caliban.schema.ArgBuilder[Any]] | |
{ | |
val elem$1: | |
(String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
) | |
= | |
Tuple3.apply[String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
](label, annotations, builder) | |
(Nil: | |
List[ | |
Tuple3[String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
] | |
] | |
).::[ | |
(String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
) | |
](elem$1) | |
} | |
} | |
: | |
List[ | |
Tuple3[String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
] | |
] | |
).::[(String, List[Any], caliban.schema.ArgBuilder[Any]) | |
] | |
(elem$1) | |
} | |
} | |
: | |
List[ | |
Tuple3[String, List[Any], caliban.schema.ArgBuilder[Any]] | |
] | |
).::[(String, List[Any], caliban.schema.ArgBuilder[Any])]( | |
elem$1 | |
) | |
} | |
}:List[Tuple3[String, List[Any], caliban.schema.ArgBuilder[Any]]] | |
lazy val traitLabel: m.MirroredLabel = "Origin" | |
{ | |
final class $anon() extends Object(), caliban.schema.ArgBuilder[ | |
dev.zio.quickstart.ExampleData.Origin | |
] { | |
def build(input: caliban.InputValue): | |
Either[caliban.CalibanError.ExecutionError, | |
dev.zio.quickstart.ExampleData.Origin | |
] | |
= | |
input match | |
{ | |
case | |
caliban.Value.EnumValue(value @ _): | |
caliban.Value.EnumValue | |
=> Some.apply[String](value) | |
case | |
caliban.Value.StringValue(value @ _): | |
caliban.Value.StringValue | |
=> Some.apply[String](value) | |
case _ => None | |
} | |
match | |
{ | |
case Some.unapply[String](value @ _):Some[String] => | |
subTypes.find( | |
{ | |
def $anonfun( | |
x$1: | |
(String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
) | |
): Boolean = | |
{ | |
def label: String = x$1._1 | |
def annotations: List[Any] = x$1._2 | |
def _$1: caliban.schema.ArgBuilder[Any] = x$1._3 | |
annotations.collectFirst[String]( | |
{ | |
def $anonfun(x$1: Any): String = | |
x$1:(x$1 : Any) @unchecked match | |
{ | |
case | |
caliban.schema.Annotations.GQLName( | |
name @ _ | |
):caliban.schema.Annotations.GQLName | |
=> name:String | |
} | |
closure($anonfun: | |
PartialFunction[Any, String] | |
) | |
} | |
).contains[String](value).||(label.==(value)) | |
} | |
closure($anonfun) | |
} | |
) match | |
{ | |
case | |
Some.unapply[ | |
(String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
) | |
]( | |
Tuple3.unapply[String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
](_, _, builder @ _) | |
): | |
Some[(String, List[Any], | |
caliban.schema.ArgBuilder[Any] | |
)] | |
=> | |
builder.asInstanceOf[ | |
caliban.schema.ArgBuilder[ | |
dev.zio.quickstart.ExampleData.Origin | |
] | |
].build( | |
caliban.InputValue.ObjectValue.apply( | |
Map.apply[String, Nothing]( | |
[ : (String, Nothing)]* | |
) | |
) | |
) | |
case None => | |
Left.apply[caliban.CalibanError.ExecutionError, | |
Nothing | |
]( | |
caliban.CalibanError.ExecutionError.apply( | |
_root_.scala.StringContext.apply( | |
["Invalid value "," for trait ","" : String] | |
* | |
).s([value,traitLabel : Any]*) | |
, | |
caliban.CalibanError.ExecutionError. | |
$lessinit$greater$default$2 | |
, | |
caliban.CalibanError.ExecutionError. | |
$lessinit$greater$default$3 | |
, | |
caliban.CalibanError.ExecutionError. | |
$lessinit$greater$default$4 | |
, | |
caliban.CalibanError.ExecutionError. | |
$lessinit$greater$default$5 | |
) | |
) | |
} | |
case None => | |
Left.apply[caliban.CalibanError.ExecutionError, Nothing] | |
( | |
caliban.CalibanError.ExecutionError.apply( | |
_root_.scala.StringContext.apply( | |
["Can\'t build a trait from input ","" : String]* | |
).s([input : Any]*) | |
, | |
caliban.CalibanError.ExecutionError. | |
$lessinit$greater$default$2 | |
, | |
caliban.CalibanError.ExecutionError. | |
$lessinit$greater$default$3 | |
, | |
caliban.CalibanError.ExecutionError. | |
$lessinit$greater$default$4 | |
, | |
caliban.CalibanError.ExecutionError. | |
$lessinit$greater$default$5 | |
) | |
) | |
} | |
} | |
new $anon(): | |
caliban.schema.ArgBuilder[dev.zio.quickstart.ExampleData.Origin] | |
} | |
}:caliban.schema.ArgBuilder[dev.zio.quickstart.ExampleData.Origin]: | |
caliban.schema.ArgBuilder[dev.zio.quickstart.ExampleData.Origin] | |
).asInstanceOf[caliban.schema.ArgBuilder[Any]] | |
{ | |
val elem$1: (String, List[Any], caliban.schema.ArgBuilder[Any]) = | |
Tuple3.apply[String, List[Any], caliban.schema.ArgBuilder[Any]](label | |
, | |
annotations, builder) | |
(Nil:List[Tuple3[String, List[Any], caliban.schema.ArgBuilder[Any]]]).:: | |
[ | |
(String, List[Any], caliban.schema.ArgBuilder[Any])](elem$1) | |
} | |
}:List[Tuple3[String, List[Any], caliban.schema.ArgBuilder[Any]]] | |
lazy val annotations: Map[String, List[Any]] = | |
(Nil:List[Tuple2[String, List[Any]]]).to[Map[String, List[Any]]]( | |
collection.MapFactory.toFactory[String, List[Any], Map](Map) | |
) | |
{ | |
final class $anon() extends Object(), caliban.schema.ArgBuilder[ | |
dev.zio.quickstart.ExampleData.CharactersArgs | |
] { | |
def build(input: caliban.InputValue): | |
Either[caliban.CalibanError.ExecutionError, | |
dev.zio.quickstart.ExampleData.CharactersArgs | |
] | |
= | |
fields.map[Either[caliban.CalibanError.ExecutionError, Any]]( | |
{ | |
def $anonfun( | |
x$1: (String, List[Any], caliban.schema.ArgBuilder[Any]) | |
): Either[caliban.CalibanError.ExecutionError, Any] = | |
{ | |
def label: String = x$1._1 | |
def _$2: List[Any] = x$1._2 | |
def builder: caliban.schema.ArgBuilder[Any] = x$1._3 | |
input match | |
{ | |
case | |
caliban.InputValue.ObjectValue(fields @ _): | |
caliban.InputValue.ObjectValue | |
=> | |
val finalLabel: String = | |
annotations.getOrElse[List[Any]](label, Nil). | |
collectFirst | |
[String]( | |
{ | |
def $anonfun(x$1: Any): String = | |
x$1:(x$1 : Any) @unchecked match | |
{ | |
case | |
caliban.schema.Annotations.GQLName( | |
name @ _ | |
):caliban.schema.Annotations.GQLName | |
=> name:String | |
} | |
closure($anonfun:PartialFunction[Any, String]) | |
} | |
).getOrElse[String](label) | |
val default: Option[String] = | |
annotations.getOrElse[List[Any]](label, Nil). | |
collectFirst | |
[String]( | |
{ | |
def $anonfun(x$1: Any): String = | |
x$1:(x$1 : Any) @unchecked match | |
{ | |
case | |
caliban.schema.Annotations.GQLDefault( | |
v @ _ | |
):caliban.schema.Annotations.GQLDefault | |
=> v:String | |
} | |
closure($anonfun:PartialFunction[Any, String]) | |
} | |
) | |
fields.get(finalLabel).fold[ | |
Either[caliban.CalibanError.ExecutionError, Any] | |
](builder.buildMissing(default))( | |
{ | |
val $1$: caliban.schema.ArgBuilder[Any] = builder | |
{ | |
def $anonfun(input: caliban.InputValue): | |
Either[caliban.CalibanError.ExecutionError, Any] | |
= $1$.build(input) | |
closure($anonfun) | |
} | |
} | |
) | |
case value @ _ => builder.build(value) | |
} | |
} | |
closure($anonfun) | |
} | |
).foldRight[Either[caliban.CalibanError.ExecutionError, Tuple]]( | |
Right.apply[Nothing, EmptyTuple.type](EmptyTuple) | |
)( | |
{ | |
def $anonfun(x$1: Either[caliban.CalibanError.ExecutionError, Any] | |
, | |
x$2: Either[caliban.CalibanError.ExecutionError, Tuple]): | |
Either[caliban.CalibanError.ExecutionError, Tuple] | |
= | |
Tuple2.apply[Either[caliban.CalibanError.ExecutionError, Any], | |
Either[caliban.CalibanError.ExecutionError, Tuple] | |
](x$1, x$2) match | |
{ | |
case | |
Tuple2.unapply[ | |
Either[caliban.CalibanError.ExecutionError, Any] | |
, Either[caliban.CalibanError.ExecutionError, Tuple]]( | |
item @ _ | |
, acc @ _) | |
=> | |
item match | |
{ | |
case | |
error @ | |
_:Left[caliban.CalibanError.ExecutionError, Any] | |
=> | |
error.asInstanceOf[ | |
Left[caliban.CalibanError.ExecutionError, Tuple] | |
] | |
case | |
Right.unapply[caliban.CalibanError.ExecutionError, | |
Any | |
](value @ _): | |
Right[caliban.CalibanError.ExecutionError, Any] | |
=> | |
acc.map[Any *: Tuple]( | |
{ | |
def $anonfun(_$3: Tuple): Any *: Tuple = | |
{ | |
val Tuple_this: (_$3 : Tuple) = _$3 | |
runtime.Tuples.cons(value, Tuple_this). | |
asInstanceOf | |
[*:[Any, Tuple]]:*:[Any, Tuple] | |
} | |
closure($anonfun) | |
} | |
) | |
} | |
} | |
closure($anonfun) | |
} | |
).map[dev.zio.quickstart.ExampleData.CharactersArgs]( | |
{ | |
def $anonfun(p: Product): | |
dev.zio.quickstart.ExampleData.CharactersArgs | |
= m.fromProduct(p) | |
closure($anonfun) | |
} | |
) | |
} | |
new $anon(): | |
caliban.schema.ArgBuilder[dev.zio.quickstart.ExampleData.CharactersArgs] | |
} | |
}:caliban.schema.ArgBuilder[dev.zio.quickstart.ExampleData.CharactersArgs]: | |
caliban.schema.ArgBuilder[dev.zio.quickstart.ExampleData.CharactersArgs] | |
, dev.zio.quickstart.ExampleApi.charactersArgsSchema, | |
{ | |
val SchemaDerivation_this: | |
(dev.zio.quickstart.ExampleApi : dev.zio.quickstart.ExampleApi.type) | |
= dev.zio.quickstart.ExampleApi | |
{ | |
val SchemaDerivation_this: | |
(SchemaDerivation_this : | |
(dev.zio.quickstart.ExampleApi : dev.zio.quickstart.ExampleApi.type) | |
) | |
= SchemaDerivation_this | |
{ | |
val $scrutinee132: | |
( | |
deriving.Mirror{ | |
MirroredType = | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, | |
Nothing | |
, List[dev.zio.quickstart.ExampleData.Character]] | |
; | |
MirroredMonoType = | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, | |
Nothing | |
, List[dev.zio.quickstart.ExampleData.Character]] | |
; MirroredElemTypes <: Tuple | |
} | |
& | |
scala.deriving.Mirror.Sum{ | |
MirroredMonoType = | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, | |
Nothing | |
, List[dev.zio.quickstart.ExampleData.Character]] | |
; | |
MirroredType = | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, | |
Nothing | |
, List[dev.zio.quickstart.ExampleData.Character]] | |
; MirroredLabel = ("ZIO" : String) | |
} | |
){ | |
MirroredElemTypes = ( | |
zio.ZIO.Sync[List[dev.zio.quickstart.ExampleData.Character]] | |
, | |
zio.ZIO.Async[Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, | |
zio.ZIO.OnSuccessAndFailure[Any, Any, Nothing, Any, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, | |
zio.ZIO.OnSuccess[Any, Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, | |
zio.ZIO.OnFailure[Any, Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, zio.ZIO.UpdateRuntimeFlags, | |
zio.ZIO.UpdateRuntimeFlagsWithin[Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, zio.ZIO.GenerateStackTrace, | |
zio.ZIO.Stateful[Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, zio.ZIO.WhileLoop[Any, Any, Any], zio.ZIO.YieldNow, | |
zio.Exit[Nothing, List[dev.zio.quickstart.ExampleData.Character] | |
] | |
); | |
MirroredElemLabels = (("Sync" : String), ("Async" : String), | |
("OnSuccessAndFailure" : String) | |
, ("OnSuccess" : String), ("OnFailure" : String), | |
("UpdateRuntimeFlags" : String) | |
, ("UpdateRuntimeFlagsWithin" : String), | |
("GenerateStackTrace" : String) | |
, ("Stateful" : String), ("WhileLoop" : String), | |
("YieldNow" : String) | |
, ("Exit" : String)) | |
} | |
= | |
zio.ZIO.$asInstanceOf[ | |
( | |
deriving.Mirror{ | |
MirroredType = | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, | |
Nothing | |
, List[dev.zio.quickstart.ExampleData.Character]] | |
; | |
MirroredMonoType = | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, | |
Nothing | |
, List[dev.zio.quickstart.ExampleData.Character]] | |
; MirroredElemTypes <: Tuple | |
} | |
& | |
scala.deriving.Mirror.Sum{ | |
MirroredMonoType = | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, | |
Nothing | |
, List[dev.zio.quickstart.ExampleData.Character]] | |
; | |
MirroredType = | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, | |
Nothing | |
, List[dev.zio.quickstart.ExampleData.Character]] | |
; MirroredLabel = ("ZIO" : String) | |
} | |
){ | |
MirroredElemTypes = ( | |
zio.ZIO.Sync[List[dev.zio.quickstart.ExampleData.Character]] | |
, | |
zio.ZIO.Async[Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, | |
zio.ZIO.OnSuccessAndFailure[Any, Any, Nothing, Any, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, | |
zio.ZIO.OnSuccess[Any, Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, | |
zio.ZIO.OnFailure[Any, Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, zio.ZIO.UpdateRuntimeFlags, | |
zio.ZIO.UpdateRuntimeFlagsWithin[Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, zio.ZIO.GenerateStackTrace, | |
zio.ZIO.Stateful[Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, zio.ZIO.WhileLoop[Any, Any, Any], zio.ZIO.YieldNow, | |
zio.Exit[Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
); | |
MirroredElemLabels = (("Sync" : String), ("Async" : String), | |
("OnSuccessAndFailure" : String) | |
, ("OnSuccess" : String), ("OnFailure" : String), | |
("UpdateRuntimeFlags" : String) | |
, ("UpdateRuntimeFlagsWithin" : String), | |
("GenerateStackTrace" : String) | |
, ("Stateful" : String), ("WhileLoop" : String), | |
("YieldNow" : String) | |
, ("Exit" : String)) | |
} | |
] | |
val m: | |
( | |
deriving.Mirror{ | |
MirroredType = | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, | |
Nothing | |
, List[dev.zio.quickstart.ExampleData.Character]] | |
; | |
MirroredMonoType = | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, | |
Nothing | |
, List[dev.zio.quickstart.ExampleData.Character]] | |
; MirroredElemTypes <: Tuple | |
} | |
& | |
scala.deriving.Mirror.Sum{ | |
MirroredMonoType = | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, | |
Nothing | |
, List[dev.zio.quickstart.ExampleData.Character]] | |
; | |
MirroredType = | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, | |
Nothing | |
, List[dev.zio.quickstart.ExampleData.Character]] | |
; MirroredLabel = ("ZIO" : String) | |
} | |
){ | |
MirroredElemTypes = ( | |
zio.ZIO.Sync[List[dev.zio.quickstart.ExampleData.Character]] | |
, | |
zio.ZIO.Async[Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, | |
zio.ZIO.OnSuccessAndFailure[Any, Any, Nothing, Any, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, | |
zio.ZIO.OnSuccess[Any, Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, | |
zio.ZIO.OnFailure[Any, Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, zio.ZIO.UpdateRuntimeFlags, | |
zio.ZIO.UpdateRuntimeFlagsWithin[Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, zio.ZIO.GenerateStackTrace, | |
zio.ZIO.Stateful[Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, zio.ZIO.WhileLoop[Any, Any, Any], zio.ZIO.YieldNow, | |
zio.Exit[Nothing, List[dev.zio.quickstart.ExampleData.Character] | |
] | |
); | |
MirroredElemLabels = (("Sync" : String), ("Async" : String), | |
("OnSuccessAndFailure" : String) | |
, ("OnSuccess" : String), ("OnFailure" : String), | |
("UpdateRuntimeFlags" : String) | |
, ("UpdateRuntimeFlagsWithin" : String), | |
("GenerateStackTrace" : String) | |
, ("Stateful" : String), ("WhileLoop" : String), | |
("YieldNow" : String) | |
, ("Exit" : String)) | |
} | |
= $scrutinee132 | |
lazy val members: | |
List[(String, List[Any], caliban.schema.Schema[Any, Any], Int)] | |
= | |
{ | |
val SchemaDerivation_this: | |
(SchemaDerivation_this : | |
(SchemaDerivation_this : | |
(dev.zio.quickstart.ExampleApi : | |
dev.zio.quickstart.ExampleApi.type | |
) | |
) | |
) | |
= SchemaDerivation_this | |
val index$proxy64: Int = | |
SchemaDerivation_this.recurse$default$1[Any, m.MirroredElemLabels | |
, | |
m.MirroredElemTypes] | |
{ | |
val label: String = "Sync".toString() | |
val annotations: List[Any] = Nil:List[Any] | |
val builder: caliban.schema.Schema[Any, Any] = | |
compiletime.summonInline[ | |
caliban.schema.Schema[Any, | |
zio.ZIO.Sync[List[dev.zio.quickstart.ExampleData.Character]] | |
] | |
].asInstanceOf[caliban.schema.Schema[Any, Any]] | |
{ | |
val elem$1: | |
(String, List[Any], caliban.schema.Schema[Any, Any], Int) | |
= | |
Tuple4.apply[String, List[Any], | |
caliban.schema.Schema[Any, Any] | |
, Int](label, annotations, builder, index$proxy64) | |
SchemaDerivation_this.recurse[Any, | |
(("Async" : String), ("OnSuccessAndFailure" : String), | |
("OnSuccess" : String) | |
, ("OnFailure" : String), ("UpdateRuntimeFlags" : String), | |
("UpdateRuntimeFlagsWithin" : String) | |
, ("GenerateStackTrace" : String), ("Stateful" : String), | |
("WhileLoop" : String) | |
, ("YieldNow" : String), ("Exit" : String)) | |
, | |
( | |
zio.ZIO.Async[Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, | |
zio.ZIO.OnSuccessAndFailure[Any, Any, Nothing, Any, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, | |
zio.ZIO.OnSuccess[Any, Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, | |
zio.ZIO.OnFailure[Any, Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, zio.ZIO.UpdateRuntimeFlags, | |
zio.ZIO.UpdateRuntimeFlagsWithin[Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, zio.ZIO.GenerateStackTrace, | |
zio.ZIO.Stateful[Any, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
, zio.ZIO.WhileLoop[Any, Any, Any], zio.ZIO.YieldNow, | |
zio.Exit[Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
) | |
](index$proxy64.+(1)).::[ | |
(String, List[Any], caliban.schema.Schema[Any, Any], Int) | |
](elem$1) | |
} | |
}: | |
List[ | |
Tuple4[String, List[Any], caliban.schema.Schema[Any, Any], Int] | |
] | |
} | |
lazy val info: caliban.schema.macros.TypeInfo = | |
SchemaDerivation_this.inline$Macros$i2(caliban.schema.macros).typeInfo | |
[ | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
] | |
lazy val annotations: List[Any] = | |
SchemaDerivation_this.inline$Macros$i3(caliban.schema.macros). | |
annotations | |
[ | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, Nothing | |
, | |
List[dev.zio.quickstart.ExampleData.Character]] | |
] | |
lazy val subTypes: | |
List[(String, caliban.introspection.adt.__Type, List[Any])] | |
= | |
members.map[(String, caliban.introspection.adt.__Type, List[Any])]( | |
{ | |
def $anonfun( | |
x$1: (String, List[Any], caliban.schema.Schema[Any, Any], Int) | |
): (String, caliban.introspection.adt.__Type, List[Any]) = | |
x$1 match | |
{ | |
case | |
Tuple4.unapply[String, List[Any], | |
caliban.schema.Schema[Any, Any] | |
, Int](label @ _, subTypeAnnotations @ _, schema @ _, _) | |
=> | |
Tuple3.apply[String, caliban.introspection.adt.__Type, | |
List[Any] | |
](label, | |
schema.toType_(schema.toType_$default$1, | |
schema.toType_$default$2 | |
) | |
, subTypeAnnotations) | |
} | |
closure($anonfun) | |
} | |
).sortBy[String]( | |
{ | |
def $anonfun( | |
x$1: (String, caliban.introspection.adt.__Type, List[Any]) | |
): String = | |
x$1 match | |
{ | |
case | |
Tuple3.unapply[String, caliban.introspection.adt.__Type, | |
List[Any] | |
](label @ _, _, _) | |
=> | |
label:String | |
} | |
closure($anonfun) | |
} | |
)(math.Ordering.String) | |
lazy val isEnum: Boolean = | |
subTypes.forall( | |
{ | |
def $anonfun( | |
x$1: (String, caliban.introspection.adt.__Type, List[Any]) | |
): Boolean = | |
x$1 match | |
{ | |
case | |
Tuple3.unapply[String, caliban.introspection.adt.__Type, | |
List[Any] | |
](_, t @ _, _) | |
if | |
t.fields.apply( | |
caliban.introspection.adt.__DeprecatedArgs.apply( | |
Some.apply[Boolean](true) | |
) | |
).forall( | |
{ | |
def $anonfun( | |
_$1: List[caliban.introspection.adt.__Field] | |
): Boolean = _$1.isEmpty | |
closure($anonfun) | |
} | |
).&&( | |
t.inputFields.forall( | |
{ | |
def $anonfun( | |
_$2: List[caliban.introspection.adt.__InputValue] | |
): Boolean = _$2.isEmpty | |
closure($anonfun) | |
} | |
) | |
) | |
=> | |
true | |
case _ => | |
false | |
} | |
closure($anonfun) | |
} | |
) | |
lazy val isInterface: Boolean = | |
annotations.exists( | |
{ | |
def $anonfun(x$1: Any): Boolean = | |
x$1 match | |
{ | |
case | |
caliban.schema.Annotations.GQLInterface(): | |
caliban.schema.Annotations.GQLInterface | |
=> | |
true | |
case _ => | |
false | |
} | |
closure($anonfun) | |
} | |
) | |
lazy val isUnion: Boolean = | |
annotations.exists( | |
{ | |
def $anonfun(x$1: Any): Boolean = | |
x$1 match | |
{ | |
case | |
caliban.schema.Annotations.GQLUnion(): | |
caliban.schema.Annotations.GQLUnion | |
=> | |
true | |
case _ => | |
false | |
} | |
closure($anonfun) | |
} | |
) | |
{ | |
final class $anon() extends Object(), caliban.schema.Schema[Any, | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, Nothing | |
, | |
List[dev.zio.quickstart.ExampleData.Character]] | |
] { | |
def toType(isInput: Boolean, isSubscription: Boolean): | |
caliban.introspection.adt.__Type | |
= | |
if | |
isEnum.&&(subTypes.nonEmpty).&&(isInterface.unary_!).&&( | |
isUnion.unary_! | |
) | |
then | |
{ | |
caliban.schema.Types.makeEnum( | |
Some.apply[String]( | |
SchemaDerivation_this. | |
caliban$schema$SchemaDerivation$$inline$getName | |
(annotations, info) | |
) | |
, | |
SchemaDerivation_this. | |
caliban$schema$SchemaDerivation$$inline$getDescription | |
(annotations) | |
, | |
subTypes.collect[caliban.introspection.adt.__EnumValue]( | |
{ | |
def $anonfun( | |
x$1: | |
(String, caliban.introspection.adt.__Type, List[Any] | |
) | |
): caliban.introspection.adt.__EnumValue = | |
x$1: | |
(x$1 : (String, caliban.introspection.adt.__Type, | |
List[Any] | |
)) @unchecked | |
match | |
{ | |
case | |
Tuple3.unapply[String, | |
caliban.introspection.adt.__Type | |
, List[Any]](name @ _, | |
caliban.introspection.adt.__Type(_, _, | |
description @ _ | |
, _, _, _, _, _, _, _, _, _) | |
, annotations @ _) | |
=> | |
caliban.introspection.adt.__EnumValue.apply(name | |
, | |
description, | |
annotations.collectFirst[Unit]( | |
{ | |
def $anonfun(x$1: Any): Unit = | |
x$1:(x$1 : Any) @unchecked match | |
{ | |
case | |
caliban.schema.Annotations. | |
GQLDeprecated | |
(_): | |
caliban.schema.Annotations. | |
GQLDeprecated | |
=> | |
() | |
} | |
closure($anonfun: | |
PartialFunction[Any, Unit] | |
) | |
} | |
).isDefined | |
, | |
annotations.collectFirst[String]( | |
{ | |
def $anonfun(x$1: Any): String = | |
x$1:(x$1 : Any) @unchecked match | |
{ | |
case | |
caliban.schema.Annotations. | |
GQLDeprecated | |
(reason @ _): | |
caliban.schema.Annotations. | |
GQLDeprecated | |
=> | |
reason:String | |
} | |
closure($anonfun: | |
PartialFunction[Any, String] | |
) | |
} | |
) | |
) | |
} | |
closure($anonfun: | |
PartialFunction[(String, | |
caliban.introspection.adt.__Type | |
, List[Any]), caliban.introspection.adt.__EnumValue] | |
) | |
} | |
) | |
, Some.apply[String](info.full), | |
Some.apply[List[caliban.parsing.adt.Directive]]( | |
SchemaDerivation_this. | |
caliban$schema$SchemaDerivation$$inline$getDirectives | |
(annotations) | |
) | |
) | |
} | |
else | |
if isInterface.unary_! then | |
caliban.schema.Types.makeUnion( | |
Some.apply[String]( | |
SchemaDerivation_this. | |
caliban$schema$SchemaDerivation$$inline$getName | |
(annotations, info) | |
) | |
, | |
SchemaDerivation_this. | |
caliban$schema$SchemaDerivation$$inline$getDescription | |
(annotations) | |
, | |
subTypes.map[caliban.introspection.adt.__Type]( | |
{ | |
def $anonfun( | |
x$1: | |
(String, caliban.introspection.adt.__Type, List[Any] | |
) | |
): caliban.introspection.adt.__Type = | |
x$1 match | |
{ | |
case | |
Tuple3.unapply[String, | |
caliban.introspection.adt.__Type | |
, List[Any]](_, t @ _, _) | |
=> | |
SchemaDerivation_this. | |
caliban$schema$SchemaDerivation$$inline$fixEmptyUnionObject | |
(t) | |
} | |
closure($anonfun) | |
} | |
) | |
, Some.apply[String](info.full), | |
Some.apply[List[caliban.parsing.adt.Directive]]( | |
SchemaDerivation_this. | |
caliban$schema$SchemaDerivation$$inline$getDirectives | |
(annotations) | |
) | |
) | |
else | |
{ | |
val impl: List[caliban.introspection.adt.__Type] = | |
subTypes.map[caliban.introspection.adt.__Type]( | |
{ | |
def $anonfun( | |
_$3: | |
(String, caliban.introspection.adt.__Type, | |
List[Any] | |
) | |
): caliban.introspection.adt.__Type = | |
_$3._2.copy(_$3._2.copy$default$1, | |
_$3._2.copy$default$2 | |
, _$3._2.copy$default$3, _$3._2.copy$default$4, | |
interfaces = | |
{ | |
def $anonfun(): | |
Option[ | |
List[caliban.introspection.adt.__Type] | |
] | |
= | |
Some.apply[ | |
List[caliban.introspection.adt.__Type] | |
]( | |
List.apply[ | |
caliban.introspection.adt.__Type | |
]( | |
[this.toType(isInput, isSubscription) : | |
caliban.introspection.adt.__Type | |
]* | |
) | |
) | |
closure($anonfun) | |
} | |
, _$3._2.copy$default$6, _$3._2.copy$default$7, | |
_$3._2.copy$default$8 | |
, _$3._2.copy$default$9, _$3._2.copy$default$10, | |
_$3._2.copy$default$11 | |
, _$3._2.copy$default$12) | |
closure($anonfun) | |
} | |
) | |
val commonFields: | |
() => List[caliban.introspection.adt.__Field] | |
= | |
{ | |
def $anonfun(): List[caliban.introspection.adt.__Field] | |
= | |
impl.flatMap[List[caliban.introspection.adt.__Field]]( | |
{ | |
def $anonfun(_$4: caliban.introspection.adt.__Type) | |
: | |
IterableOnce[ | |
List[caliban.introspection.adt.__Field] | |
] | |
= | |
_$4.fields.apply( | |
caliban.introspection.adt.__DeprecatedArgs.apply | |
( | |
Some.apply[Boolean](true)) | |
) | |
closure($anonfun) | |
} | |
).flatten[caliban.introspection.adt.__Field]( | |
$conforms[List[caliban.introspection.adt.__Field]] | |
).groupBy[String]( | |
{ | |
def $anonfun(_$5: caliban.introspection.adt.__Field) | |
: | |
String = _$5.name | |
closure($anonfun) | |
} | |
).filter( | |
{ | |
def $anonfun( | |
x$1: | |
(String, List[caliban.introspection.adt.__Field] | |
) | |
): Boolean = | |
x$1 match | |
{ | |
case | |
Tuple2.unapply[String, | |
List[caliban.introspection.adt.__Field] | |
](name @ _, list @ _) | |
=> | |
list.lengthCompare(impl.size).==(0) | |
} | |
closure($anonfun) | |
} | |
).collect[Option[caliban.introspection.adt.__Field]]( | |
{ | |
def $anonfun( | |
x$1: | |
(String, List[caliban.introspection.adt.__Field] | |
) | |
): Option[caliban.introspection.adt.__Field] = | |
x$1: | |
(x$1 : (String, | |
List[caliban.introspection.adt.__Field] | |
)) @unchecked | |
match | |
{ | |
case | |
Tuple2.unapply[String, | |
List[caliban.introspection.adt.__Field] | |
](name @ _, list @ _) | |
=> | |
caliban.schema.Types.unify( | |
list.map[caliban.introspection.adt.__Type] | |
( | |
{ | |
def $anonfun( | |
_$6: caliban.introspection.adt.__Field | |
): caliban.introspection.adt.__Type = | |
_$6.type.apply() | |
closure($anonfun) | |
} | |
) | |
).flatMap[caliban.introspection.adt.__Field] | |
( | |
{ | |
def $anonfun( | |
t: caliban.introspection.adt.__Type | |
): | |
Option[ | |
caliban.introspection.adt.__Field | |
] | |
= | |
list.headOption.map[ | |
caliban.introspection.adt.__Field | |
]( | |
{ | |
def $anonfun( | |
_$7: | |
caliban.introspection.adt. | |
__Field | |
): caliban.introspection.adt.__Field | |
= | |
_$7.copy(_$7.copy$default$1, | |
_$7.copy$default$2 | |
, _$7.copy$default$3, | |
type = | |
{ | |
def $anonfun(): | |
caliban.introspection.adt. | |
__Type | |
= t | |
closure($anonfun) | |
} | |
, _$7.copy$default$5, | |
_$7.copy$default$6 | |
, _$7.copy$default$7) | |
closure($anonfun) | |
} | |
) | |
closure($anonfun) | |
} | |
) | |
} | |
closure($anonfun: | |
PartialFunction[(String, | |
List[caliban.introspection.adt.__Field] | |
), Option[caliban.introspection.adt.__Field]] | |
) | |
} | |
).flatten[caliban.introspection.adt.__Field]( | |
$conforms[Option[caliban.introspection.adt.__Field]] | |
).toList | |
closure($anonfun) | |
} | |
caliban.schema.Types.makeInterface( | |
Some.apply[String]( | |
SchemaDerivation_this. | |
caliban$schema$SchemaDerivation$$inline$getName | |
(annotations, info) | |
) | |
, | |
SchemaDerivation_this. | |
caliban$schema$SchemaDerivation$$inline$getDescription | |
(annotations) | |
, commonFields, impl, Some.apply[String](info.full), | |
Some.apply[List[caliban.parsing.adt.Directive]]( | |
SchemaDerivation_this. | |
caliban$schema$SchemaDerivation$$inline$getDirectives | |
(annotations) | |
) | |
) | |
} | |
def resolve( | |
value: | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, | |
Nothing | |
, List[dev.zio.quickstart.ExampleData.Character]] | |
): caliban.schema.Step[Any] = | |
{ | |
val $1$: (String, caliban.schema.Schema[Any, Any]) = | |
members.apply(m.ordinal(value)): | |
(String, List[Any], caliban.schema.Schema[Any, Any], Int) | |
@unchecked | |
match | |
{ | |
case | |
Tuple4.unapply[String, List[Any], | |
caliban.schema.Schema[Any, Any] | |
, Int](label @ _, _, schema @ _, _) | |
=> | |
Tuple2.apply[String, caliban.schema.Schema[Any, Any]]( | |
label | |
, schema) | |
} | |
val label: String = $1$._1 | |
val schema: caliban.schema.Schema[Any, Any] = $1$._2 | |
if isEnum then | |
caliban.schema.PureStep.apply( | |
caliban.Value.EnumValue.apply(label) | |
) | |
else schema.resolve(value) | |
} | |
} | |
new $anon(): | |
caliban.schema.Schema[Any, | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, | |
Nothing | |
, List[dev.zio.quickstart.ExampleData.Character]] | |
] | |
} | |
}: | |
caliban.schema.Schema[Any, | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
] | |
}: | |
caliban.schema.Schema[Any, | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
] | |
} | |
) | |
But given instance gen in trait SchemaDerivation does not match type caliban.schema.Schema[Any, | |
zio.ZIO[dev.zio.quickstart.ExampleService.ExampleService, Nothing, | |
List[dev.zio.quickstart.ExampleData.Character] | |
] | |
]. | |
) @@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment