Skip to content
Back

Type 'Theme' does not satisfy the constraint 'Row'.

  • 0
  • Databases
  • Web
  • Cloud
RoxGame
5 Dec, 2025, 01:16

Type 'Theme' does not satisfy the constraint 'Row'. Type 'Theme' is missing the following properties from type 'Row': $id, $sequence, $tableId, $databaseId, and 3 more.

TypeScript
interface Theme {
    Background: string;
    Secondary: string;
    FontPrimary: string;
    FontSecondary: string;
    Icons: string;
    Shadow: string;
}

export const GetTheme = query(async () => {
    const { tablesDB } = getAdminServices();

    var theme = await tablesDB.listRows<Theme>({
        databaseId: '******',
        tableId: 'theme',
        queries: [Query.limit(1)]
    });

    return theme;
});

how to fix that problem am doing types manually i don't want to use Cli to generate the types cause it rise a lot of changes in my project when i call appwrite init project

TL;DR
Developers encountered an issue where the type 'Theme' did not satisfy the constraint 'Row' due to missing properties. The solution is to extend the 'Theme' interface to include the missing properties from the 'Row' type. Example code provided. Following the outdated documentation led to this problem. Concerns about using the CLI to generate types without causing many project changes were also mentioned.
RoxGame
5 Dec, 2025, 01:18

i follow this example at step 8 https://appwrite.io/docs/quick-starts/node

RoxGame
5 Dec, 2025, 01:18

doc seems outdated

RoxGame
5 Dec, 2025, 01:20

found the solution i just have to extend the row

TypeScript
interface Theme extends Models.Row {
    Background: string;
    Secondary: string;
    FontPrimary: string;
    FontSecondary: string;
    Icons: string;
    Shadow: string;
}
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more