Hi all,
Found this very useful post when I was trying to get a graphQL query to work, which has got me most of the way there, but I’m struggling with the last bit.
I’m querying a Civil3d model pushed from the new connectors to find objects with speckle_type=…CivilBaseline. From those objects, One bit of data I need is the alignment name, which I believe I should be able to select with “alignment.name” like this:
query($myQuery: [JSONObject!]) {
project(id: "XXX") {
object(id: "XXX") {
id
children(query: $myQuery select: ["alignment.name"]) {
totalCount
objects {
data
}
}
}
}
}
{
"myQuery": [
{
"field": "speckle_type",
"value": "Objects.BuiltElements.Civil.CivilBaseline",
"operator": "="
}
]
}
But these are always coming back as null. Is this because the alignment is a referenced object? If I just select “alignment” in the query above, the response is:
{
"data": {
"project": {
"object": {
"id": "XXX",
"children": {
"totalCount": 10,
"objects": [
{
"data": {
"alignment": {
"referencedId": "XXX",
"speckle_type": "reference"
},
"id": XXX"
}
},
If the referenced object is the problem - what’s the correct way to construct the query to get the alignment.name?