Closed paulpdaniels closed 1 year ago
Given a unioned type union _Entity = UserProfile | Plan | Subscription_ | Customer | Organization
union _Entity = UserProfile | Plan | Subscription_ | Customer | Organization
The client generation bails with:
error: Query.scala: org.scalafmt.dynamic.exceptions.PositionExceptionImpl: Query.scala:66: error: [dialect scala213] : expected but identifier found def _entities[A](representations : List[_Any] = Nil)(onCustomer: SelectionBuilder[Customer, A], onOrganization: SelectionBuilder[Organization, A], onPlan: SelectionBuilder[Plan, A], onSubscription_: SelectionBuilder[`Subscription_`, A], onUserProfile: SelectionBuilder[UserProfile, A])(implicit encoder0: ArgEncoder[List[_Any]]): SelectionBuilder[_root_.caliban.client.Operations.RootQuery, List[scala.Option[A]]] = _root_.caliban.client.SelectionBuilder.Field("_entities", ListOf(OptionOf(ChoiceOf(Map("Customer" -> Obj(onCustomer), "Organization" -> Obj(onOrganization), "Plan" -> Obj(onPlan), "Subscription_" -> Obj(onSubscription_), "UserProfile" -> Obj(onUserProfile))))), arguments = List(Argument("representations", representations, "[_Any!]!")(encoder0)))
Scala version: 2.13.10
Same as https://github.com/ghostdogpr/caliban/issues/1825
Given a unioned type
union _Entity = UserProfile | Plan | Subscription_ | Customer | Organization
The client generation bails with:
Scala version: 2.13.10