# pub.chive.graph.edge

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.graph.edge)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.graph.edge/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.graph.edge/examples)

## Definitions

### `pub.chive.graph.edge`

**Type**: `record`

Typed relationship between knowledge graph nodes. Relation types are themselves nodes with subkind=relation.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes | UUID identifier (also used as rkey) |
| `status` | `string` | Yes | Edge lifecycle status |
| `weight` | `integer` | No | Optional edge weight for ranking (scaled by 1000 for 0.0-1.0 range) |
| `metadata` | `ref` → `#edgeMetadata` | No | Edge-specific metadata |
| `createdAt` | `string` (datetime) | Yes |  |
| `createdBy` | `string` (did) | No | DID of creator or governance |
| `sourceUri` | `string` (at-uri) | Yes | AT-URI of source node |
| `targetUri` | `string` (at-uri) | Yes | AT-URI of target node |
| `updatedAt` | `string` (datetime) | No |  |
| `proposalUri` | `string` (at-uri) | No | AT-URI of the proposal that created this edge (null for seeded) |
| `relationUri` | `string` (at-uri) | No | AT-URI of relation type node (subkind=relation) |
| `relationSlug` | `string` | Yes | Relation slug for queries (broader, narrower, related, etc.) |
| `schemaRevision` | `integer` | No | Schema revision this record was created with. Absent means revision 1. |

### `pub.chive.graph.edge#edgeMetadata`

**Type**: `object`

Edge-specific metadata

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `source` | `string` | No | Source of the relationship assertion |
| `endDate` | `string` (datetime) | No | Temporal end (for time-bounded relationships) |
| `startDate` | `string` (datetime) | No | Temporal start (for time-bounded relationships) |
| `confidence` | `integer` | No | Confidence score for automatically inferred edges (scaled by 1000 for 0.0-1.0 range) |

## Raw Schema

```json
{
  "id": "pub.chive.graph.edge",
  "defs": {
    "main": {
      "key": "any",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "id",
          "sourceUri",
          "targetUri",
          "relationSlug",
          "status",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "UUID identifier (also used as rkey)"
          },
          "status": {
            "type": "string",
            "description": "Edge lifecycle status",
            "knownValues": [
              "proposed",
              "established",
              "deprecated"
            ]
          },
          "weight": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 0,
            "description": "Optional edge weight for ranking (scaled by 1000 for 0.0-1.0 range)"
          },
          "metadata": {
            "ref": "#edgeMetadata",
            "type": "ref",
            "description": "Edge-specific metadata"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "createdBy": {
            "type": "string",
            "format": "did",
            "description": "DID of creator or governance"
          },
          "sourceUri": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of source node"
          },
          "targetUri": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of target node"
          },
          "updatedAt": {
            "type": "string",
            "format": "datetime"
          },
          "proposalUri": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the proposal that created this edge (null for seeded)"
          },
          "relationUri": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of relation type node (subkind=relation)"
          },
          "relationSlug": {
            "type": "string",
            "maxLength": 50,
            "description": "Relation slug for queries (broader, narrower, related, etc.)"
          },
          "schemaRevision": {
            "type": "integer",
            "minimum": 1,
            "description": "Schema revision this record was created with. Absent means revision 1."
          }
        }
      },
      "description": "Typed relationship between knowledge graph nodes. Relation types are themselves nodes with subkind=relation."
    },
    "edgeMetadata": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "maxLength": 200,
          "description": "Source of the relationship assertion"
        },
        "endDate": {
          "type": "string",
          "format": "datetime",
          "description": "Temporal end (for time-bounded relationships)"
        },
        "startDate": {
          "type": "string",
          "format": "datetime",
          "description": "Temporal start (for time-bounded relationships)"
        },
        "confidence": {
          "type": "integer",
          "maximum": 1000,
          "minimum": 0,
          "description": "Confidence score for automatically inferred edges (scaled by 1000 for 0.0-1.0 range)"
        }
      },
      "description": "Edge-specific metadata"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
