I'm trying to define a mutation like the following:
case class Department(name: String)
trait Mutation {
@GraphQLField
def createDepartment(department: Department): Department = {
// Not implemented
department
}
}
val mutation: Mutation = new Mutation {}
val mutationType: ObjectType[Unit, Unit] = deriveContextObjectType[Unit, Mutation, Unit](_ => mutation)
And I can't find my way pass this error:
Error:(96, 93) Type ssor.model.package.Department @@ sangria.marshalling.FromInput.InputObjectResult cannot be used as an input. Please consider defining an implicit instance of `FromInput` for it.
val mutationType: ObjectType[Unit, Unit] = deriveContextObjectType[Unit, Mutation, Unit](_ => mutation)
Could anyone give any pointers on way I'm missing?
I couldn't even figure out if I'm missing some implicits or if this is even supported at all to pass objects as arguments in sangria.
Thanks,
Carlos