---
title: "circle_link | GraphQL API | Rolebase"
description: "Circle Link, represents a link between two circles, enabling cross-functional collaboration and representation of one circle within another beyond the parent-child hierarchy."
url: "https://rolebase.io/en/developers/graphql-api/circle_link"
---

[Rolebase](/) ⟩[Developers](/en/developers) ⟩[GraphQL API](/en/developers/graphql-api)

# circle\_link

Circle Link, represents a link between two circles, enabling cross-functional collaboration and representation of one circle within another beyond the parent-child hierarchy.

## Fields

Field

Type

Description

`id`

`uuid`

Unique identifier for the circle link

`parentId`

`uuid`

Reference to the hosting circle

`circleId`

`uuid`

Reference to the invited circle

`createdAt`

`Timestamp`

When the circle link was created

`archivedAt`

`Timestamp`

When the circle link was archived; null if active

## Relationships

**Object Relationships:**

*   `hostCircle` — The circle that hosts the linked circle (referenced by `parentId`)
*   `invitedCircle` — The circle that is invited to participate (referenced by `circleId`)

## Query Examples

### Get Links for a Specific Circle

```
query GetCircleLinks($parentId: uuid!) {  circle_link(where: { parentId: { _eq: $parentId } }) {    id    hostCircle {      id      role {        name      }    }    invitedCircle {      id      role {        name      }    }    createdAt  }}
```

## Mutation Examples

### Create a Circle Link

```
mutation CreateCircleLink {  insert_circle_link_one(    object: { parentId: "host-circle-id", circleId: "invited-circle-id" }  ) {    id    hostCircle {      role {        name      }    }    invitedCircle {      role {        name      }    }  }}
```

### Remove a Circle Link

Links are archived (soft-deleted) by setting `archivedAt`, not physically deleted.

```
mutation ArchiveCircleLink {  update_circle_link(    where: {      parentId: { _eq: "host-circle-id" }      circleId: { _eq: "invited-circle-id" }      archivedAt: { _is_null: true }    }    _set: { archivedAt: "2024-01-01T00:00:00Z" }  ) {    affected_rows  }}
```

## Permissions

*   **Organization owners:** Full access
*   **Organization admins/members:** Can create links if governance is not protected
*   **Circle leaders of the host circle:** Can create and manage links
*   **Public:** Limited to viewing links in organizations with shared member information

** Notes**

The combination of `parentId` and `circleId` must be unique. Circle links affect participant inheritance and permission structures. Leaders of linked circles gain certain permissions in the host circle.
