Admin API / Types
DirectConversation
ObjectA one-to-one conversation between the caller and another user. Visible when the caller is a participant, the other participant has a membership row in this store that is not BANNED and has no shadow ban, the caller does not block them, and the conversation has a message that is not deleted. A conversation that the caller hid stays hidden until a new message comes. Only the caller's own conversations: store staff do not see the inbox of the store owner.
admin:chat:readThe requirement applies to every field of DirectConversation unless that field declares its own scopes.
type DirectConversation implements NodeFields
| Field | Type | Description |
|---|---|---|
awaitingReply | Boolean! | True when the other participant wrote the newest message that the caller sees. A read in a District app does not change it. An answer from the caller sets it to false. |
createdAt | DateTime! | When the conversation started. |
hasUnreadMessages | Boolean! | True when another user posted a message after the caller's last read. |
id | ID! | A globally unique ID. Treat this value as an opaque string. |
inbox | DirectConversationInbox! | The inbox of the conversation for the caller. |
lastMessageAt | DateTime! | When the newest message was posted. |
latestMessage | ChatMessage | The newest message that is not deleted and is after the caller's hide point. Null when no such message exists. |
messages | DirectConversationMessageConnection! | The messages after the caller's hide point and within retention, newest first. A deleted message reads as a tombstone: text null. first outside 1 to 100 (10,000 for Soho) or an after that this connection did not issue gives a thrown VALIDATION_ERROR. Keyset cursors; no row ceiling. Reading the messages does not mark them read.Arguments:after: String — Return messages after this cursor. Omit for the first page.first: Int — Maximum number of messages to return. Defaults to 20, capped at 100 (10,000 for Soho). |
participant | User! | The other participant. |