Rolebase Developers
API Reference

decision

Represents a formal decision made within a circle. Decisions track important choices, policies, and agreements, and can be referenced in threads and other entities for documentation.

Fields

Field Type Description
id uuid Unique identifier for the decision (auto-generated)
orgId uuid Reference to the organization
circleId uuid Reference to the circle where the decision was made
memberId uuid Reference to the member who made the decision
title String Title of the decision
description String Detailed description of the decision (supports rich text)
createdAt Timestamp When the decision was created (defaults to current timestamp)
archived Boolean Whether the decision is archived (defaults to false)
private Boolean Whether the decision is private (defaults to false)

Relationships

Object Relationships

  • org — The organization this decision belongs to
  • circle — The circle where the decision was made
  • member — The member who made the decision

Referenced By

  • thread_activity — Decisions can be referenced in thread activities
  • Search index — Decisions are indexed for organization-wide search

Query Examples

List Decisions

query GetDecisions($orgId: uuid!) {
  decision(where: { archived: { _eq: false }, orgId: { _eq: $orgId } }) {
    id
    title
    description
    createdAt
    circle {
      role {
        name
      }
    }
    member {
      name
    }
  }
}

Get a Specific Decision

query GetDecision($decisionId: uuid!) {
  decision_by_pk(id: $decisionId) {
    id
    title
    description
    createdAt
    circle {
      role {
        name
      }
    }
    member {
      name
    }
    private
    archived
  }
}

Mutation Examples

Create a Decision

mutation CreateDecision {
  insert_decision_one(
    object: {
      orgId: "your-org-id"
      circleId: "circle-id"
      memberId: "member-id"
      title: "New Working Hours Policy"
      description: "The organization will adopt flexible working hours..."
      private: false
    }
  ) {
    id
    title
    createdAt
  }
}

Update a Decision

mutation UpdateDecision {
  update_decision_by_pk(
    pk_columns: { id: "decision-id" }
    _set: {
      description: "Updated policy details..."
      title: "Updated Working Hours Policy"
    }
  ) {
    id
    title
    description
  }
}

Archive a Decision

mutation ArchiveDecision {
  update_decision_by_pk(
    pk_columns: { id: "decision-id" }
    _set: { archived: true }
  ) {
    id
  }
}

Permissions

Decision access is controlled by several factors:

  • Circle membership — Circle participants can access and create decisions in their circles
  • Privacy settings — Private decisions are only visible to circle participants
  • Organization role — Organization members can access non-private decisions
  • Modification rights — Circle participants can modify decisions. Organization members can modify non-private decisions
  • Archived decisions remain accessible but are hidden from default views

Decisions provide a formal record of important organizational choices. They can be referenced in threads for context and discussion, and are searchable across the organization.