Author:
Girish Padmanabha
Changed on:
25 June 2024
The Comment GraphQL API enables you to create, update, and query comments linked to various entities within the Fluent platform. The Comment entity is independent and not tied to a specific entity. When creating a comment, you can associate it with an entity type, entity Id, or entity reference, making it retrievable via the comments query. Multiple comments can be added to the same entity, each automatically capturing the timestamp and user that created the comment. This feature can record specific business actions and events, providing a comprehensive history of interactions and updates.
`createComment`
`updateComment`
`comments`
`commentById`
`COMMENT_CREATE`
`COMMENT_UPDATE`
`COMMENT_VIEW`
The
`createComment`
`createCommentInput`
Field | Type | Description |
entityType | String! | Type of the entity. For example, ORDER, FULFILMENT, ORDERITEM, PRODUCTCATALOGUE, etc. |
entityId | ID | ID of the entity. Note: While the type of this field is ID, it currently only supports Integer values. |
entityRef | String | Reference of the entity. |
text | String! | Comment text. Max character limit: 200. |
The
`updateComment`
`UpdateCommentInput`
Field | Type | Description |
id | ID! | ID of the comment object. |
entityRef | String | Reference of the entity. |
text | String! | Comment text. Max character limit: 200. |
The
`comments`
Argument | Type | Description |
entityType | [String!] | Type of the entity. For example, ORDER, FULFILMENT, ORDERITEM, PRODUCTCATALOGUE, etc. |
entityId | [ID] | ID of the entity. |
entityRef | [String] | Entity reference. |
text | [String!] | Comment text. |
createdOn | DateRange | Date range for creation. |
updatedOn | DateRange | Date range for last update. |
first | Int | Returns the first n elements from the list. |
last | Int | Returns the last n elements from the list. |
before | String | Returns the elements in the list that come before the specified global ID. |
after | String | Returns the elements in the list that come after the specified global ID. |
The response consists of edges and nodes representing the comments.
Field | Type | Description |
id | ID! | ID of the comment object. |
entityType | String! | Type of the entity. For example, ORDER, FULFILMENT, ORDERITEM, PRODUCTCATALOGUE, etc. |
entityId | ID | ID of the entity. |
entityRef | String | Entity reference. |
text | String! | Comment text. |
createdOn | DateTime | Time of creation. |
updatedOn | DateTime | Time of last update. |
user | User | The author of the comment. |
The
`commentById`
Field | Type | Description |
id | ID! | ID of the comment object. |
The response consists of the details of the comment.
Field | Type | Description |
id | ID! | ID of the comment object. |
entityType | String! | Type of the entity. For example, ORDER, FULFILMENT, ORDERITEM, PRODUCTCATALOGUE, etc. |
entityId | ID | ID of the entity. |
entityRef | String | Entity reference. |
text | String! | Comment text. |
createdOn | DateTime | Time of creation. |
updatedOn | DateTime | Time of last update. |
user | User | The author of the comment. |
Permissions required for different operations on comments:
`COMMENT_CREATE`
`COMMENT_UPDATE`
`COMMENT_VIEW`
The Comment GraphQL API provides flexibility for clients to manage comments across various entities. Multiple comments can be added against the same entity, with each comment automatically capturing the timestamp and the user who created it. This feature allows users to add comments as specific business actions occur against an entity.
This flexibility allows the capture of essential information at various stages of business processes, ensuring that all relevant data is saved and can be retrieved when needed.
Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.