# Syncable Entity Integration

Contributing to the Twenty codebase itself (twentyhq/twenty server internals), not for...

- Repository: https://github.com/twentyhq/twenty (60258 stars)
- Category: Business
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add twentyhq/twenty --skill syncable-entity-integration -g -a claude-code -y`
Codex: `npx skills add twentyhq/twenty --skill syncable-entity-integration -g -a codex -y`
Cursor: `npx skills add twentyhq/twenty --skill syncable-entity-integration -g -a cursor -y`
Gemini CLI: `npx skills add twentyhq/twenty --skill syncable-entity-integration -g -a gemini-cli -y`

## Description

Contributing to the Twenty codebase itself (twentyhq/twenty server internals), not for building apps on top of Twenty. Wire syncable entity services into NestJS modules, create service layer and resolvers for Twenty entities. Use when registering builders, validators, and action handlers in modules, creating business services, or exposing entities via GraphQL API with proper exception handling.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Syncable Entity: Integration (Step 5/6)

**Purpose**: Wire everything together, register in modules, create services and resolvers.

**When to use**: After completing Steps 1-4 (all previous steps). Required before testing.

---

## Quick Start

This step:
1. Registers services in 3 NestJS modules
2. Creates service layer (returns flat entities)
3. Creates resolver layer (converts flat → DTO)
4. Uses exception interceptor for GraphQL

**Key principle**: Services return flat entities, resolvers transpile flat → DTO.

---

## Step 1: Register in Builder Module

**File**: `src/engine/workspace-manager/workspace-migration/workspace-migration-builder/workspace-migration-builder.module.ts`

```typescript
import { WorkspaceMigrationMyEntityActionsBuilderService } from 'src/engine/workspace-manager/workspace-migration/workspace-migration-builder/builders/my-entity/workspace-migration-my-entity-actions-builder.service';

@Module({
  imports: [
    // ... existing imports
  ],
  providers: [
    // ... existing providers
    WorkspaceMigrationMyEntityActionsBuilderService,
  ],
  exports: [
    // ... existing exports
    WorkspaceMigrationMyEntityActionsBuilderService,
  ],
})
export class WorkspaceMigrationBuilderModule {}
```

**Important**: Add to both `providers` AND `exports` (builder needs to be exported for orchestrator).

---

## Step 2: Register in Validators Module

**File**: `src/engine/workspace-manager/workspace-migration/workspace-migration-builder/validators/workspace-migration-builder-validators.module.ts`

```typescript
import { FlatMyEntityValidatorService } from 'src/engine/workspace-manager/workspace-migration/workspace-migration-builder/validators/services/flat-my-entity-validator.service';

The rest: https://github.com/twentyhq/twenty/blob/HEAD/.claude/skills/syncable-entity-integration/SKILL.md
