Transparent conversion of case classes


do you know if there is some library that allows transparent conversion of two different case classes with same fields? Say, I have some data class case class thrift.Result(value: String) of Thrift-based microservice, that I’d like to pass to case class graphql.Result(value: String) GraphQL microservice. All I’d like to do is call a method copy[thrift.Result, graphql.Result](instance: thrift.Result): graphql.Result. I guess this should be some kind of macro under the hood.

I have just come across this one:
There are probably others, probably all of them using Shapeless.

1 Like