I have a field I need to accept that is in the shape of a map, but I’m not sure how to tell Absinthe/GraphQL that it should expect a map as the argument? Here is what I’m working with:
field :create_prediction, :prediction do
arg(:question_id, non_null(:id))
arg(:team_id, non_null(:id))
arg(:prediction_params, non_null(:map))
end
ERROR:
:map is not defined in your schema.
The prediction_params
field should be able to accept this: %{player_points: 10}
but I’m not sure how to make that possible with Absinthe. Does anybody know how to handle this problem? I wasn’t able to find what I needed from the docs.