Hey everyone,
I'm connecting to a graphql resource, so far I have variables working, however when I try send a JSONObject as a variable my query fails - I get a error message back from the endpoint. I've tried writing the JSONObject into the variable field of the query, as well as setting it as a Javascript transformer myQuery
and then referencing it into the graphql query get_objects
The graphql query get_objects
looks something like this:
query ($idname: String!, $objectid: String!, $myQuery: [JSONObject!]) {
stream(id: $idname) {
object(id: $objectid) {
totalChildrenCount
children(query: $myQuery) {
objects {
data
}
}
}
}
}
with myQuery
looking like:
{
"myQuery": [
{
"field": "type",
"value": "Objects.Other",
"operator": "="
}
]
}
I've tested with Postman and myQuery
works fine. Is it not possible to use JSONObjects as variables? Am I formatting my JSONObject wrong?
Any help would be fantastic.