Groups
Groups
Sign in
Groups
Groups
sangria-graphql
Conversations
About
Send feedback
Help
Having MapType for Scala Map
208 views
Skip to first unread message
Ros
unread,
Apr 28, 2018, 12:22:26 AM
4/28/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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 AM
4/28/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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:
https://gitter.im/sangria-graphql/sangria?at=5ae2267b2b9dfdbc3ad1eb09
Cheers,
Oleg
Reply all
Reply to author
Forward
0 new messages