syncable-entity-integration

Registers syncable entity builders, validators, and action handlers in NestJS modules with GraphQL resolvers.

Updated Aug 3, 2026
One-click install
npx skills add https://github.com/masoodtalha/twenty --skill syncable-entity-integration-masoodtalha
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: syncable-entity-integration
Source: https://github.com/masoodtalha/twenty/tree/main/.cursor/skills/syncable-entity-integration
Command: npx skills add https://github.com/masoodtalha/twenty --skill syncable-entity-integration-masoodtalha

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Wiring a new syncable entity into Twenty's workspace migration system requires registering services across multiple NestJS modules and correctly layering services and resolvers, which is error-prone without a clear guide. ## Core Features & Use Cases - Module Registration: Register migration builders, validators, and action handlers in the correct NestJS modules with proper providers and exports. - Service Layer Creation: Build services that transform input to universal flat entities, run validate-build-and-run migrations, and return flat entities. - Resolver Layer with DTO Conversion: Expose entities via GraphQL mutations using an exception interceptor and flat-to-DTO conversion utilities. - Use Case: After defining a new metadata entity's types and migration logic, use this Skill to wire it into the builder module, validators module, and action handlers module, then expose create/update/delete mutations through the GraphQL API. ## Quick Start Wire my new entity into the Twenty workspace migration modules and create its service and GraphQL resolver following the syncable entity integration pattern.

Frequently Asked Questions about syncable-entity-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I register a new entity in NestJS modules for Twenty?▼

Add the builder and validator services to both providers and exports in their respective modules, and register create, update, and delete action handlers in the action handlers module providers only. Action handlers are typically not exported.

How to create a GraphQL resolver for a Twenty metadata entity?▼

Create a resolver that calls the service layer, converts the returned flat entity to a DTO using a conversion utility, and applies the WorkspaceMigrationGraphqlApiExceptionInterceptor. Define create, update, and delete mutations returning DTOs.

Should NestJS services return DTOs or flat entities?▼

Services should return flat entities, not DTOs. The service layer handles business logic and validation orchestration with no knowledge of GraphQL types, while the resolver layer converts flat entities to DTOs for the API.

What does the WorkspaceMigrationGraphqlApiExceptionInterceptor handle?▼

It catches FlatEntityMapsException, WorkspaceMigrationBuilderException, and WorkspaceMigrationRunnerException, formatting them into GraphQL errors. It also translates error messages based on user locale for consistent frontend error structure.

When should action handlers be exported from a NestJS module?▼

Action handlers are typically only added to providers, not exports, since they are consumed internally by the migration runner. Builders and validators must be exported because the orchestrator depends on them.