You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Playground settings should be able to accept any JSON type (although maybe not Object or Array?).
Actual Behavior
with_setting can only accept a &str for the value, so any values passed are serialised into a JSON string. These then stay as a string while being inserted into the playground settings.
I think this could be solved by changing GraphQLPlaygroundConfig's settings Hashmap into Hashmap<&'str, Value> and then changing with_setting to accept a Value.
I'd be happy to put a PR together for this, let me know if you think this is viable.
The text was updated successfully, but these errors were encountered:
Expected Behavior
Playground settings should be able to accept any JSON type (although maybe not Object or Array?).
Actual Behavior
with_setting
can only accept a&str
for the value, so any values passed are serialised into a JSON string. These then stay as a string while being inserted into the playground settings.Specifications
I think this could be solved by changing
GraphQLPlaygroundConfig
's settings Hashmap intoHashmap<&'str, Value>
and then changingwith_setting
to accept a Value.I'd be happy to put a PR together for this, let me know if you think this is viable.
The text was updated successfully, but these errors were encountered: