Having MapType for Scala Map

208 views
Skip to first unread message

Ros

unread,
Apr 28, 2018, 12:22:26 AM4/28/18
to sangria-graphql
Hello,

Is there specific types for Scala Map in Sangria Schema?
I need to have a support for Map[String, Any].
If not, any equivalent might work e.g. Json object type.

Thanks,
Ros

Oleg Ilyenko

unread,
Apr 28, 2018, 11:00:01 AM4/28/18
to sangria-graphql
Hi,

No unfortunately at the moment GraphQL does not support `Map` types. You might find this discussion interesting: https://github.com/facebook/graphql/issues/101

There is a way to implement a JSON scalar type, but generally, I would discourage from using it. Recently I described it a bit in the gitter chat:


Cheers,
Oleg
Reply all
Reply to author
Forward
0 new messages