graphql-client
graphql-client copied to clipboard
Support JSONObject
This library seems to be lacking support for JSONObject, or maybe I'm holding it wrong.
mutation TestMutation($user_data: JSONObject) {
testMutation(uuid: $uuid, userData: $user_data) {
uuid
}
}
JSONObject isn't a "custom" data type since I'm pretty sure it's part of the GraphQL spec. If I try to turn the aforementioned GraphQL into code, I get the error cannot find type `JSONObject` in module `super.
I should be able to "just" use JSONObject with this library, considering it's a part of GraphQL, but I'm not able to. Or maybe I'm mistaken.
You can always create your own type mapping:
type JSONObject = serde_json::Map<String, serde_json::Value>;