AiChatMutations
No description
type AiChatMutations {
createChat(
processId: Long
subjectKind: String
subjectId: Long
name: String!
settings: String
origin: String
): WorkflowChat
openBarryThread: WorkflowChat
newBarryConversation: WorkflowChat
compactChat(
chatId: Long!
): Boolean
sendChatMessage(
chatId: Long!
content: String!
workflowData: WorkflowDataGqlInput
agentDraft: String
appSnapshot: String
homeContext: String
taskFeedbackContext: String
dashboardSnapshot: String
chartDraft: String
integrationId: Long
model: String
files: [String!]!
focusKind: String
focusId: Long
surface: String
): Boolean
cancelChatTurn(
chatId: Long!
): Boolean
respondToToolCall(
chatId: Long!
toolCallId: String!
approved: Boolean!
note: String
alwaysAllow: Boolean
inputClaim: String
): Boolean
undoToolCall(
chatId: Long!
toolCallId: String!
): Boolean @deprecated
updateChatSettings(
chatId: Long!
settings: String!
): WorkflowChat
renameChat(
chatId: Long!
name: String!
): WorkflowChat
deleteChat(
chatId: Long!
): Boolean
revokeApprovalGrant(
approvalGrantId: Long!
): Boolean
revokeAllApprovalGrants: Boolean
}
Fields
AiChatMutations.createChat ● WorkflowChat object
Create an AI copilot chat on a process
AiChatMutations.createChat.processId ● Long scalar
AiChatMutations.createChat.subjectKind ● String scalar
Chat subject kind: workflow | agent | home
AiChatMutations.createChat.subjectId ● Long scalar
AiChatMutations.createChat.name ● String! non-null scalar
AiChatMutations.createChat.settings ● String scalar
ChatSettings json (mode, maxToolCalls, integrationId, model, disabledIntegrationIds, disabledToolIds, disabledMcpToolIds)
AiChatMutations.createChat.origin ● String scalar
Which surface opened this chat: direct | fix_with_barry | home. Metrics only - gates nothing.
AiChatMutations.openBarryThread ● WorkflowChat object
Open the signed-in member's most recent Barry conversation in this organization, creating one when they have none. Their idle per-subject chats are adopted as conversations first (in place, with their history).
AiChatMutations.newBarryConversation ● WorkflowChat object
Start a new Barry conversation for the signed-in member, or return their existing empty one
AiChatMutations.compactChat ● Boolean scalar
Compact an overflowed conversation with its current model and automatically continue its stored user request. Preserves the full transcript.
AiChatMutations.compactChat.chatId ● Long! non-null scalar
AiChatMutations.sendChatMessage ● Boolean scalar
Send a user message and start the copilot's turn (streams via watchChat)
AiChatMutations.sendChatMessage.chatId ● Long! non-null scalar
AiChatMutations.sendChatMessage.content ● String! non-null scalar
AiChatMutations.sendChatMessage.workflowData ● WorkflowDataGqlInput input
Workflow chats: the current canvas graph — becomes the chat's working graph
AiChatMutations.sendChatMessage.agentDraft ● String scalar
Agent chats: the builder form's AgentDraftSnapshot JSON — becomes the chat's working draft
AiChatMutations.sendChatMessage.appSnapshot ● String scalar
App chats: the editor's AppDraftSnapshot JSON — a MANIFEST of the draft (identity, content digest, paths and sizes), never file contents. App files live in app_file and Barry writes them through AppService directly, so there is no working copy to carry
AiChatMutations.sendChatMessage.homeContext ● String scalar
Home chats: the HomeSnapshot JSON (the organization the chat is scoped to)
AiChatMutations.sendChatMessage.taskFeedbackContext ● String scalar
Task-feedback chats: the TaskFeedbackSnapshot JSON (the agent session the interview is about)
AiChatMutations.sendChatMessage.dashboardSnapshot ● String scalar
Barry threads focused on a dashboard: the DashboardSnapshot JSON ({dashboardPublicId, version, editing, pendingOps})
AiChatMutations.sendChatMessage.chartDraft ● String scalar
Barry threads focused on the chart editor: the ChartDraftSnapshot JSON (the editor's unsaved draft)
AiChatMutations.sendChatMessage.integrationId ● Long scalar
The AI connection this turn runs on. Omit (with model) to keep the chat's current one, or -- on a chat that has none -- to run on the organization's default AI connection: the Honeybase AI credits connection, else its only enabled AI connection. That is how a member who cannot list connections still sends.
AiChatMutations.sendChatMessage.model ● String scalar
The model for this turn. Omit to keep the chat's current one, or to use the connection's default model.
AiChatMutations.sendChatMessage.files ● [String!]! non-null scalar
Public ids of already-uploaded workflow files to attach to this message (pasted images). Ids only: the server rebuilds each reference from its own row, so a name, type or size claimed by the client is never believed. Capped per message and by total bytes; every attachment is replayed on each subsequent turn of the chat.
AiChatMutations.sendChatMessage.focusKind ● String scalar
Barry threads only: the editor this message is sent from - workflow | agent | app | task_feedback | dashboard | chart - with focusId. Its snapshot rides in the matching argument above (workflowData, agentDraft, appSnapshot, taskFeedbackContext, dashboardSnapshot, chartDraft); with no focus, send homeContext.
AiChatMutations.sendChatMessage.focusId ● Long scalar
Barry threads only: the focused editor's subject id (process id, agent id, app id, agent session id, or the focusId of a dashboard or chart; 0 for a new chart).
AiChatMutations.sendChatMessage.surface ● String scalar
Barry threads only: a SurfaceInput JSON saying where the user is ({page, objectKind?, objectId?, selection?, filters?}). Structure only: the server resolves every name under your own permissions and builds the note Barry reads from it.
AiChatMutations.cancelChatTurn ● Boolean scalar
Stop the in-flight copilot turn
AiChatMutations.cancelChatTurn.chatId ● Long! non-null scalar
AiChatMutations.respondToToolCall ● Boolean scalar
Approve or reject a pending tool call; with alwaysAllow, also grant it a standing approval
AiChatMutations.respondToToolCall.chatId ● Long! non-null scalar
AiChatMutations.respondToToolCall.toolCallId ● String! non-null scalar
AiChatMutations.respondToToolCall.approved ● Boolean! non-null scalar
AiChatMutations.respondToToolCall.note ● String scalar
Rejections only: an optional free-text reply the copilot sees verbatim (it may carry the content you actually want, e.g. a corrected form schema). Capped server-side.
AiChatMutations.respondToToolCall.alwaysAllow ● Boolean scalar
Approvals only: also record a standing approval ("Approve always") for this tool, so matching future calls in any of your chats proceed without a card. Personal, revocable (revokeApprovalGrant), never widens permissions - the call still runs under your own rights. On a release (release_workflow, release_agent, release_app) the standing approval covers only that one process, agent or app. Ignored on rejections; refused on cards that ask you for something (input requests and the approvals card itself, manage_approval_grants) and on a release whose target cannot be resolved.
AiChatMutations.respondToToolCall.inputClaim ● String scalar
Input-request cards only: an InputClaim JSON saying what the user created (e.g. {"Integration":{"integrationId":42}}). It is a POINTER, never a fact and never tool arguments — the server re-reads what it points at under your own permissions and builds the copilot's result from what it finds, so a forged or cross-organization id yields an 'unavailable' result rather than anything the model believes.
AiChatMutations.updateChatSettings ● WorkflowChat object
Update a chat's settings (mode, tool-call limit, model, connections Barry may not read in this chat)
AiChatMutations.updateChatSettings.chatId ● Long! non-null scalar
AiChatMutations.updateChatSettings.settings ● String! non-null scalar
AiChatMutations.renameChat ● WorkflowChat object
Rename a chat
AiChatMutations.renameChat.chatId ● Long! non-null scalar
AiChatMutations.renameChat.name ● String! non-null scalar
AiChatMutations.deleteChat ● Boolean scalar
Delete a chat and its transcript
AiChatMutations.deleteChat.chatId ● Long! non-null scalar
AiChatMutations.revokeApprovalGrant ● Boolean scalar
Revoke one of the signed-in user's standing approvals; matching calls ask again from the next one
AiChatMutations.revokeApprovalGrant.approvalGrantId ● Long! non-null scalar
AiChatMutations.revokeAllApprovalGrants ● Boolean scalar
Revoke every standing approval the signed-in user holds in this organization
Show deprecatedHide deprecated
AiChatMutations.undoToolCall ● Boolean deprecated scalar
Undo was removed (Barry Harness Phase 0). Ask the copilot to put a change back.
Removed: the one-click undo of a copilot write no longer exists. Always fails; ask the copilot to put the change back instead (its receipt in the chat says what it was before).
AiChatMutations.undoToolCall.chatId ● Long! non-null scalar
AiChatMutations.undoToolCall.toolCallId ● String! non-null scalar
Ignored: the mutation always refuses (undo was removed).
Returned By
aiChat mutation