Files
twenty/packages
Charles Bochet 24839d044a fix(server): repair server typecheck broken by isCustom deprecation (#21376)
## What

Repairs `server-lint-typecheck`, which is **currently red on `main`**.

After #21228 retyped `FlatObjectMetadata.isCustom` as
`WasRemovedInUpgrade<boolean> | undefined`, the spec added in #21311
still passed `flatObjectMetadata.isCustom` to
`computeTableName(nameSingular, isCustom: boolean)`:

```
graphql-query-order-group-by.parser.spec.ts(83,5): error TS2345:
Argument of type 'WasRemovedInUpgrade<boolean> | undefined' is not assignable to parameter of type 'boolean'.
```

Both PRs merged via stale bases, and `server-lint-typecheck` only runs
on PRs (not `main` pushes), so the regression landed undetected — the
next PR to touch anything server-wide surfaces it.

## Fix

Compute the expected physical table name with
**`computeObjectTargetTable`** — the production helper that derives
custom-ness from the application (`applicationUniversalIdentifier !==
TWENTY_STANDARD_APPLICATION`), which is exactly the pattern the
`isCustom` deprecation steers callers toward. This stops reading the
deprecated field and won't break again when it's removed.

One-line change in a single test file; behaviour is unchanged (custom
object → `_`-prefixed physical table).

## Verification

- `nx typecheck twenty-server`  (was failing on `main`, now passes)
- The spec runs green (3/3)
- `nx lint:diff-with-main twenty-server`  (lint + format)
2026-06-09 17:37:51 +02:00
..
2026-05-04 11:09:34 +02:00