Is there a query to get an attachment in a comment?
I have this comment in a stream with a photo attached.
The URL to the photo is: blob:https://speckle.xyz/31e1cd73-9d88-4339-b77b-0ae59061db07
I tried to retrieve the attached photo in the comment with the GraphQL explorer, but without success. Am I missing something?
EDIT: interesting project context
A project team is conducting on site inspections. They walk on site with an iPad with the Speckle viewer on it and add comments with photo’s as they go. They are exploring how to pull these comments and photo’s out of Speckle and process it further.
The query in the explorer:
query{
comments(streamId:"bfeaba6bc7"){
totalCount
items {
id
#screenshot
authorId
archived
resources{
resourceId
resourceType
}
text
{
doc
attachments {
id
streamId
userId
fileName
fileType
fileHash
fileSize
uploadStatus
uploadError
createdAt
__typename
}
}
}
}
}
The result:
{
"data": {
"comments": {
"totalCount": 1,
"items": [
{
"id": "2d1c4b5912",
"authorId": "6ceeb10e3e",
"archived": false,
"resources": [
{
"resourceId": "7ebf79f270",
"resourceType": "commit"
}
],
"text": {
"doc": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "wow! what a hole"
}
]
}
]
},
"attachments": [
{
"id": "ddb62b90c7",
"streamId": "bfeaba6bc7",
"userId": "6ceeb10e3e",
"fileName": "site inspection 04.jpg",
"fileType": "jpg",
"fileHash": "a42ff989ec4f1f702cc61381254a87ab",
"fileSize": 82506,
"uploadStatus": 1,
"uploadError": null,
"createdAt": "2022-11-04T11:31:08.036Z",
"__typename": "BlobMetadata"
}
]
}
}
]
}
}
}