sangria

Sangria-graphql: error when passing in derivedInputObjectType as an mutation argument

百般思念 提交于 2020-05-31 06:33:48
问题 I have the following case class with option fields: case class BusinessUserRow(id: String, firstName: Option[String], lastName: Option[String], email: Option[String]) I am trying to create an inputType Object for Business User Object val BusinessUserInputType = deriveInputObjectType[BusinessUserRow]( InputObjectTypeName("input"), InputObjectTypeDescription("A Business user") ) and I want to pass this BusinessInputObject as an argument to a addBusinessUser mutation val businessUserInputArg =

Sangria-graphql: error when passing in derivedInputObjectType as an mutation argument

故事扮演 提交于 2020-05-31 06:33:07
问题 I have the following case class with option fields: case class BusinessUserRow(id: String, firstName: Option[String], lastName: Option[String], email: Option[String]) I am trying to create an inputType Object for Business User Object val BusinessUserInputType = deriveInputObjectType[BusinessUserRow]( InputObjectTypeName("input"), InputObjectTypeDescription("A Business user") ) and I want to pass this BusinessInputObject as an argument to a addBusinessUser mutation val businessUserInputArg =

Server side pagination in Graphql Scala

被刻印的时光 ゝ 提交于 2020-01-05 07:12:12
问题 I need to do server side pagination in graphql in scala. I have seven reports and have used one graphql query with different operations to get the data. Now I need to add server side pagination to it and I am not able to do that. Any help would be appreciated. Below are my code: Schema: val PanelNominationStatusReportDataType = ObjectType( "PanelNominationStatus", "Dashboard Reports", fields[Unit, PanelRewardSatusDetail]( Field("awardName", OptionType(StringType), resolve = _.value.awardName)

Can not understand Fetcher.rel

谁都会走 提交于 2019-12-11 12:08:21
问题 I have the following case classes : case class OrganizationId(value: Long) extends AnyVal case class Organization(id: OrganizationId, name: String, iban: Option[String], bic: Option[String], updatedAt: LocalDateTime, insertedAt: LocalDateTime) case class EventId(value: Long) extends AnyVal case class Event( id: EventId, organizationId: OrganizationId, name: String, description: Option[String], updatedAt: LocalDateTime, insertedAt: LocalDateTime ) They represent a simple schema where an