posts

Get the posts for a given project.

Request

Query for a project's posts by a project's ID, and optionally with a searchTerm.

query($id: ID!, $postSearchTerm: String) {
	project(id: $id) {
		posts(searchTerm: $postSearchTerm) {
			id
			color
			coordinates {
				latitude
				longitude
			}
			isPrivate
			isPublic
			manager {
				... on UserAssignee {
					userId
				}
			}
			messages {
				attachments {
					id
					fileId
					fileName
				}
				author {
					firstName
					lastName
				}
				authoredById
				body
				createdAt
				id
				savedViews {
					coordinates {
						latitude
						longitude
					}
					bearing
					pitch
					zoom
				}
				source
			}
			number
			permissions {
				assignee {
					... on UserAssignee {
						userId
					}
				}
				scope
			}
			showOnLayers {
				color
				discipline {
					id
					name
				}
				id
				level {
					id
					name
				}
				name
			}
			subject
			tags {
				isPrimary
				tag {
					id
					name
				}
			}
		}
	}
}

Variables

NameType
coreIdID

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.
searchTermString

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Response

Returns the project with a list of posts.

{
   "data":{
      "project":{
         "posts":[
            {
               "id":"07926ba5-70d5-4a31-96f6-9ed320d27c37",
               "color":"#FFAB00",
               "coordinates":{
                  "latitude":32.5436297879037,
                  "longitude":-96.36206888003021
               },
               "isPrivate":false,
               "isPublic":true,
               "manager":{
                  "userId":"4a112a3d-6cd7-4226-8d74-dd70157b9ddb"
               },
               "messages":[
                  {
                     "attachments":[
                        
                     ],
                     "author":{
                        "firstName":"Todd",
                        "lastName":"Wynne"
                     },
                     "authoredById":"4a112a3d-6cd7-4226-8d74-dd70157b9ddb",
                     "body":"created 360 Photo - 8-22-2020",
                     "createdAt":"2020-08-23T22:54:31.029Z",
                     "id":"646ab6fe-ee47-479f-aa38-e397679f2dc5",
                     "savedViews":[
                        {
                           "coordinates":{
                              "latitude":32.5436524785072,
                              "longitude":-96.3620348492891
                           },
                           "bearing":0,
                           "pitch":0,
                           "zoom":22.9499
                        }
                     ],
                     "source":"SYSTEM"
                  },
                  {
                     "attachments":[
                        {
                           "id":"e1373366-f2ed-4274-b084-d48a5cc6e56d",
                           "fileId":"SoOBNNziknWw7_dCzpLj9D04RFB-cxzD",
                           "fileName":"1.JPG"
                        }
                     ],
                     "author":{
                        "firstName":"Todd",
                        "lastName":"Wynne"
                     },
                     "authoredById":"4a112a3d-6cd7-4226-8d74-dd70157b9ddb",
                     "body":null,
                     "createdAt":"2020-08-23T22:54:31.033Z",
                     "id":"b5663853-14c1-454e-82ec-bd25108039e2",
                     "savedViews":[
                        
                     ],
                     "source":"USER"
                  },
                  {
                     "attachments":[
                        
                     ],
                     "author":{
                        "firstName":"Todd",
                        "lastName":"Wynne"
                     },
                     "authoredById":"4a112a3d-6cd7-4226-8d74-dd70157b9ddb",
                     "body":"{\"ops\":[{\"attributes\":{\"link\":\"https://kuula.co/post/7MFCD\"},\"insert\":\"https://kuula.co/post/7MFCD\"},{\"insert\":\"\\n\"}]}",
                     "createdAt":"2020-08-23T23:25:29.776Z",
                     "id":"9070daff-522a-471f-8eac-a17596089231",
                     "savedViews":[
                        
                     ],
                     "source":"USER"
                  }
               ],
               "number":56,
               "permissions":[
                  {
                     "assignee":{
                        "userId":"4a112a3d-6cd7-4226-8d74-dd70157b9ddb"
                     },
                     "scope":"MANAGE"
                  }
               ],
               "showOnLayers":[
                  {
                     "color":"#212121",
                     "discipline":{
                        "id":1,
                        "name":"Architectural"
                     },
                     "id":"7087",
                     "level":{
                        "id":88656,
                        "name":"Level 1"
                     },
                     "name":"Floor Plan"
                  }
               ],
               "subject":"360 Photo - 8-22-2020",
               "tags":[
                  {
                     "isPrimary":true,
                     "tag":{
                        "id":"bfb4ff5c-f156-4e9e-aedf-839d43c3a118",
                        "name":"Photos"
                     }
                  },
                  {
                     "isPrimary":false,
                     "tag":{
                        "id":"b6b6f768-b51e-40cc-ad16-40d74f4da8bd",
                        "name":"Jobsite Progress"
                     }
                  }
               ]
            }
         ]
      }
   }
}