Query
query ProtocolComments($protocolId: String!, $protocolVersion: Int!) {
protocolComments(protocolId: $protocolId, protocolVersion: $protocolVersion) {
active
author {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
createdAt
id
name
users {
__typename
}
}
}
id
replies {
__typename
}
section
text
}
}Variables
{
"protocolId": "string",
"protocolVersion": 1
}Response
{
"data": {
"protocolComments": [
{
"active": true,
"author": {
"allowedLocations": [
{
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"__typename": "User"
}
]
}
]
},
"id": "string",
"replies": [
{
"__typename": "ProtocolComment"
}
],
"section": "string",
"text": "string"
}
]
}
}Queries
protocolComments
The top-level comments on one version of a protocol, each with its replies. Empty if there are no comments.
QUERY
protocolComments(protocolId: String!, protocolVersion: Int!): [ProtocolComment!]!Arguments
protocolId
String!
required
Id of the protocol.
protocolVersion
Int!
required
Version of the protocol.
Returns
[ProtocolComment!]!
active
Boolean!
True while the thread the comment belongs to is open, false once it has been resolved.
author
User!
The user who wrote the comment.
id
String!
Id of the comment.
replies
[ProtocolComment!]!
Replies to the comment. Empty if there are no replies.
section
String!
The part of the protocol the comment is on: one of 'OVERVIEW' (Overview), 'MATERIALS' (Materials) or 'SAFETY' (Safety), or 'STEP:' followed by the id of a procedure step.
text
String!
Text of the comment.
updatedAt
DateTime!
When the comment was last changed.
Query
query ProtocolComments($protocolId: String!, $protocolVersion: Int!) {
protocolComments(protocolId: $protocolId, protocolVersion: $protocolVersion) {
active
author {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
createdAt
id
name
users {
__typename
}
}
}
id
replies {
__typename
}
section
text
}
}Variables
{
"protocolId": "string",
"protocolVersion": 1
}Response
{
"data": {
"protocolComments": [
{
"active": true,
"author": {
"allowedLocations": [
{
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"__typename": "User"
}
]
}
]
},
"id": "string",
"replies": [
{
"__typename": "ProtocolComment"
}
],
"section": "string",
"text": "string"
}
]
}
}