Skip to content

Developers · GraphQL

GraphQL Activity-Feeds Overview

Last updated 1 November 2026

Record append-only histories with activity feeds: create an activity, publish it to feeds and read it back.

Activity feeds keep a record of things that happened, such as a user being approved or a file being uploaded. You add an activity once, then deliver it to one or more feeds. You can add to a feed and remove from it, but you can never change an activity after you create it.

Use a feed for a history that nobody should edit. Examples are an approval trail, an audit log for one record, or a timeline on a profile. The schema calls these legacy activity streams. It also marks their result collections as deprecated, so keep that in mind for new work.

Warning

The schema marks the activity feed collections as deprecated. For CRM history, the CRM module has its own append-only event stream at /crm/api/v2/event-streams.

How an activity reaches a feed

  1. Create the activityactivity_create stores a JSON payload and gives it a UUID. It is in no feed yet.
  2. Publish itactivity_publish adds it to the feeds of the owners you name, by feed type.
  3. Read the feedstreams reads one feed with its unread count.
An activity is created once and can sit in many feeds.

A feed is identified by a feed type (any name, such as User or AuditLog) and an owner id. Each feed keeps its 2,000 most recent entries and drops older ones. Handlers, stored in app/activity_streams/handlers, can also decide which feeds a published activity goes to.

The operations

OperationKindWhat it does
activity_createMutationStores an activity and returns it with a generated UUID
activity_publishMutationAdds an activity to the feeds of the given owner ids
activity_unpublishMutationRemoves activities from every feed, but keeps them
activity_unpublish_allMutationRemoves every feed. Needs confirm: true
activity_delete_allMutationDeletes every activity and feed. Needs confirm: true
activitiesQueryReads activities by id or UUID
streamsQueryReads one feed and its unread count
feedsQueryLists every feed type with the ids of its feeds
handlersQueryLists the handlers

There is no update mutation. To correct an activity, unpublish it and publish a new one.

Example: list the feeds on an instance

Query

{ feeds { name ids } }

Response on the docs instance

{
  "data": {
    "feeds": []
  }
}

This ran on the docs.insites.io instance on 1 November 2026. It returns an empty list because that instance has never published an activity.

Common mistakes

  • Expecting activity_create to show the activity in a feed. Call activity_publish next.
  • Reading a feed with streams and its default reset_last_read: true. That marks the feed as read. Pass false to read without changing the unread count.
  • Calling activity_delete_all or activity_unpublish_all without confirm: true. Nothing happens, and no error says so.
  • Relying on a feed for long history. It keeps only the latest 2,000 entries.