I have recently implemented GraphQL as an enhancement to an existing REST microservice application (written in Akka HTTP Framework) and here are a few random thoughts:
- Sangria certainly makes things easy to adapt GraphQL to most Scala projects. The way the resolvers are implemented are elegant and simple; e.g. there's no explicit way of different handling whether your resolve method is a
Future[T]
or just a value; it's treated the same in code. - Sangria can use existing case classes for the GraphQL objects, and provides macros to avoid boilerplate. However, there are a bunch of caveats and limitations; we are using scalaxb to generate our case classes from XSDs, and sadly these are not workable with the Sangria macros. Fortunately, with the awesome libray Chimney this makes it less painf