Skip to content

Commit

Permalink
Merge pull request #907 from gemini-hlsw/update/lucuma-core-0.105.1
Browse files Browse the repository at this point in the history
Update lucuma-core, lucuma-core-testkit to 0.105.1
  • Loading branch information
mergify[bot] authored Oct 14, 2024
2 parents 809b225 + 3a5bde6 commit 0e3ace2
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 66 deletions.
10 changes: 5 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ val cirisVersion = "3.6.0"
val declineVersion = "2.4.1"
val disciplineMunitVersion = "2.0.0"
val flywayVersion = "9.22.3"
val grackleVersion = "0.18.1"
val grackleVersion = "0.21.0"
val http4sVersion = "0.23.28"
val http4sBlazeVersion = "0.23.16"
val http4sEmberVersion = "0.23.28"
val http4sXmlVersion = "0.23.13"
val jwtVersion = "10.0.1"
val log4catsVersion = "2.7.0"
val lucumaCoreVersion = "0.105.0"
val lucumaGraphQLRoutesVersion = "0.8.8"
val lucumaCoreVersion = "0.105.1"
val lucumaGraphQLRoutesVersion = "0.8.14"
val munitVersion = "1.0.0"
val natcchezHttp4sVersion = "0.6.0"
val natchezVersion = "0.3.6"
Expand All @@ -25,8 +25,8 @@ val weaverVersion = "0.8.4"
Global / excludeLintKeys += scalaJSLinkerConfig

ThisBuild / tlBaseVersion := "0.6"
ThisBuild / scalaVersion := "3.4.2"
ThisBuild / crossScalaVersions := Seq("3.4.2")
ThisBuild / scalaVersion := "3.5.1"
ThisBuild / crossScalaVersions := Seq("3.5.1")
ThisBuild / scalacOptions ++= Seq(
"-language:implicitConversions"
)
Expand Down
124 changes: 63 additions & 61 deletions modules/service/src/main/scala/graphql/SsoMapping.scala
Original file line number Diff line number Diff line change
Expand Up @@ -111,67 +111,69 @@ object SsoMapping {
val UserIdType = schema.ref("UserId")
val UserType = schema.ref("User")

val typeMappings: List[TypeMapping] =
List(
ObjectMapping(
tpe = QueryType,
fieldMappings = List(
SqlObject("user"),
SqlObject("role"),
)
),
ObjectMapping(
tpe = MutationType,
fieldMappings = List(
RootEffect.computeEncodable("createApiKey")((_, e) => createApiKey(e)),
RootEffect.computeEncodable("deleteApiKey")((_, e) => deleteApiKey(e))
)
),
ObjectMapping(
tpe = UserType,
fieldMappings = List(
SqlField("id", User.Id, key = true),
SqlField("orcidId", User.OrcidId),
SqlField("givenName", User.GivenName),
SqlField("familyName", User.FamilyName),
SqlField("creditName", User.CreditName),
SqlField("email", User.Email),
SqlObject("roles", Join(User.Id, Role.UserId)),
SqlObject("apiKeys", Join(User.Id, ApiKey.UserId)),
)
),
ObjectMapping(
tpe = RoleType,
fieldMappings = List(
SqlField("id", Role.Id, key = true),
SqlField("type", Role.Type),
SqlField("partner", Role.Partner),
SqlField("«unused»", Role.UserId, hidden = true),
SqlObject("user", Join(Role.UserId, User.Id)),
)
),
ObjectMapping(
tpe = ApiKeyType,
fieldMappings = List(
SqlField("id", ApiKey.Id, key = true),
SqlField("«unused»", ApiKey.UserId, hidden = true),
SqlField("«unused»", ApiKey.RoleId, hidden = true),
SqlObject("user", Join(ApiKey.UserId, User.Id)),
SqlObject("role", Join(ApiKey.RoleId, Role.Id)),
)
),
ObjectMapping(
tpe = SubscriptionType,
fieldMappings = List(
RootStream.computeEncodable("apiKeyRevocation")((_,_) => apiKeyRevocation)
)
),
LeafMapping[model.User.Id](UserIdType),
LeafMapping[OrcidId](OrcidIdType),
LeafMapping[StandardRole.Id](RoleIdType),
LeafMapping[RoleType](RoleTypeType),
LeafMapping[Partner](PartnerType),
LeafMapping[String](ApiKeyIdType),
val typeMappings: TypeMappings =
TypeMappings(
List[TypeMapping](
ObjectMapping(
tpe = QueryType,
fieldMappings = List(
SqlObject("user"),
SqlObject("role"),
)
),
ObjectMapping(
tpe = MutationType,
fieldMappings = List(
RootEffect.computeEncodable("createApiKey")((_, e) => createApiKey(e)),
RootEffect.computeEncodable("deleteApiKey")((_, e) => deleteApiKey(e))
)
),
ObjectMapping(
tpe = UserType,
fieldMappings = List(
SqlField("id", User.Id, key = true),
SqlField("orcidId", User.OrcidId),
SqlField("givenName", User.GivenName),
SqlField("familyName", User.FamilyName),
SqlField("creditName", User.CreditName),
SqlField("email", User.Email),
SqlObject("roles", Join(User.Id, Role.UserId)),
SqlObject("apiKeys", Join(User.Id, ApiKey.UserId)),
)
),
ObjectMapping(
tpe = RoleType,
fieldMappings = List(
SqlField("id", Role.Id, key = true),
SqlField("type", Role.Type),
SqlField("partner", Role.Partner),
SqlField("«unused»", Role.UserId, hidden = true),
SqlObject("user", Join(Role.UserId, User.Id)),
)
),
ObjectMapping(
tpe = ApiKeyType,
fieldMappings = List(
SqlField("id", ApiKey.Id, key = true),
SqlField("«unused»", ApiKey.UserId, hidden = true),
SqlField("«unused»", ApiKey.RoleId, hidden = true),
SqlObject("user", Join(ApiKey.UserId, User.Id)),
SqlObject("role", Join(ApiKey.RoleId, Role.Id)),
)
),
ObjectMapping(
tpe = SubscriptionType,
fieldMappings = List(
RootStream.computeEncodable("apiKeyRevocation")((_,_) => apiKeyRevocation)
)
),
LeafMapping[model.User.Id](UserIdType),
LeafMapping[OrcidId](OrcidIdType),
LeafMapping[StandardRole.Id](RoleIdType),
LeafMapping[RoleType](RoleTypeType),
LeafMapping[Partner](PartnerType),
LeafMapping[String](ApiKeyIdType),
)
)

override val selectElaborator = SelectElaborator {
Expand Down

0 comments on commit 0e3ace2

Please sign in to comment.