Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
# One channel with the viewer's complete unread edge, for opening it. Read
# notifications are left out: a busy channel keeps one seen row per message,
# so the unfiltered edge grows with the channel's whole history.
query ChannelDetailSoup($input: SoupInput!) {
user {
id
soup(input: $input) {
items {
...SoupItemPreviewFields
# Refresh the list/badge edge even when another device already read
# everything. A distinct alias keeps this a complete detail source.
... on GraphqlSoupChannel {
sidebarUnreadNotifications: notifications(
filter: {
states: [UNSEEN]
topLevelMessagesOnly: true
}
limit: 1
) {
id
state
createdAt
}
}
notifications(filter: { states: [UNSEEN] }) {
...SoupNotificationFields
}
}
nextCursor
}
}
}