What is the syntax for selecting a dynamic property as part of a GraphQL query? I created a dynamic Material property, which shows up in the object data on querying without select, but cannot seem to isolate that field with a select. It returns nulls if just treated as text, and returns a syntax error on the SQL side if an @
prefix is included.
Response with Plain Text:
Response with Prefix:
Material field visible in 3d viewer:
error message for clarity:
"message": "select \"id\", \"createdAt\", \"speckleType\", \"totalChildrenCount\", jsonb_path_query(data, $1) as \"0\", jsonb_path_query(data, $2) as \"1\", jsonb_path_query(data, $3) as \"2\" from \"object_children_closure\" right join \"objects\" on \"objects\".\"streamId\" = \"object_children_closure\".\"streamId\" and \"objects\".\"id\" = \"object_children_closure\".\"child\" where object_children_closure.\"streamId\" = $4 AND parent = $5 and \"minDepth\" < $6 and id > $7 order by \"objects\".\"id\" asc limit $8 - syntax error, unexpected '@' at or near \"@\" of jsonpath input",
"locations": [
{
"line": 4,
"column": 7
}
],
"path": [
"stream",
"object",
"children"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"exception": {
"length": 129,
"name": "error",
"severity": "ERROR",
"code": "42601",
"file": "jsonpath_scan.l",
"line": "290",
"routine": "jsonpath_yyerror"
}
}
}
],
"data": {
"stream": {
"object": null
}
}
}