Hi guys,
I have this graphql query:
query getObject($streamId: String!, $objectId: String!, $objectQuery: [JSONObject!]) {
stream(id: $streamId) {
id
name
object(id: $objectId) {
id
data
speckleType
children(query: $objectQuery) {
totalCount
cursor
objects {
id
data
speckleType
}
}
}
}
}
And whenever $objectQuery
is not null I get data back in the children field
, but as soon as I try to filter the children they come back empty.
The funny thing is that it used to work a few days ago?
Examples:
With these variables
{
"streamId": "382b3c2620",
"objectId": "40559c6ec06ad128c0bfe5eb55024aff",
"objectQuery": [{ "field": "speckle_type", "value": "Objects.Geometry.Mesh", "operator": "=" }]
}
I get this response:
{
"data": {
"stream": {
"id": "382b3c2620",
"name": "dandas2",
"object": {
"id": "40559c6ec06ad128c0bfe5eb55024aff",
"data": {
"id": "40559c6ec06ad128c0bfe5eb55024aff",
"name": "Dandas Nodes",
"@elements": [ ... ], # <- lots of Speckle references
"__closure": { ... }, # <- lots of stuff here too
"speckle_type": "Speckle.Core.Models.Collection",
"collectionType": "Dandas Nodes",
"totalChildrenCount": null
},
"speckleType": "Speckle.Core.Models.Collection",
"children": {
"totalCount": 0,
"cursor": null,
"objects": [] # <- no stuff here :(
}
}
}
}
}
But having null as $objectQuery
gives this result:
{
"streamId": "382b3c2620",
"objectId": "40559c6ec06ad128c0bfe5eb55024aff",
"objectQuery": null
}
{
"data": {
"stream": {
"id": "382b3c2620",
"name": "dandas2",
"object": {
"id": "40559c6ec06ad128c0bfe5eb55024aff",
"data": {
"id": "40559c6ec06ad128c0bfe5eb55024aff",
"name": "Dandas Nodes",
"@elements": [ ... ], # <- lots of Speckle references
"__closure": { ... }, # <- lots of stuff here too
"speckle_type": "Speckle.Core.Models.Collection",
"collectionType": "Dandas Nodes",
"totalChildrenCount": null
},
"speckleType": "Speckle.Core.Models.Collection",
"children": {
"totalCount": 0,
"cursor": "6de0e07dd432c57e4352c0799af5fedd",
"objects": [ ... ] # <- lots of stuff here :)
}
}
}
}
}
One thing I noticed that is wierd is that totalChildrenCount
and totalCount
are null
and 0
respectively even though they should be a value.