publishToGroup
SRP
Publishes data to the group subscription channel. This mutation is IAM-authenticated (@aws_iam) and is used internally by the system to push real-time notifications.
For the canonical subscription payload contract, see:
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
groupId | ID! | Yes | The group to publish to |
data | AWSJSON! | Yes | JSON-encoded event envelope |
Return Type
GroupFeedback — contains groupId and data.
Example
mutation PublishToGroup {
publishToGroup(
groupId: "Z3JwMTIzNDU2"
data: "{\"version\":\"1.0\",\"eventId\":\"evt123\",\"timestamp\":\"2026-04-24T10:38:36.822Z\",\"level\":\"INFO\",\"event\":\"documentCreated\",\"category\":\"documentLifecycle\",\"groupId\":\"Z3JwMTIzNDU2\",\"userId\":\"dXNyMTIzNDU2\",\"requestId\":null,\"batchId\":null,\"error\":null,\"data\":{\"id\":\"doc123\",\"documentName\":\"Example document\"}}"
) {
groupId
data
}
}
The GraphQL result wrapper still returns:
groupIddata
The data field itself is the JSON-encoded event envelope.