Skip to content
Back

[bug] API response is good but UI don't work well.

  • 0
  • Cloud
VeresJohnny
15 Sep, 2025, 14:03

Hi guys! When i got my object, it have billingInfo relation, in the web ui i just got pading state, and the row shows object is null, but when i work whit this row, inside my app everything works fine.

And if im here, i have an another question.

i found this pattern : ` interface Book { name: string; author: string; releaseYear?: string; category?: string; genre?: string[]; isCheckedOut: boolean; }

const databases = new Databases(client);

try { const documents = await databases.listDocuments<Book>( 'your-database-id', 'your-collection-id' );

TypeScript
documents.documents.forEach(book => {
    console.log(`Book: ${book.name} by ${book.author}`); // Now you have full type safety
});

} catch (error) { console.error('Appwrite error:', error); } `

But when i try whit "listRows" its doest work. What i mean ? i want use only neccesary data from response. like here, but i need define my interface like this:

export interface Cart { $id: string; $sequence: number; $createdAt: string; $updatedAt: string; $permissions: string[]; $databaseId: string; $tableId: string; orderItems: OrderItem[]; }

inestead of this:

export interface Cart { $id: string; orderItems: OrderItem[]; }

TL;DR
UI issue: Developers are experiencing a problem where the API response is correct, but the UI is not displaying information properly. The row shows null objects, but everything works well in the app. Regarding defining interfaces: The developer wants to define interfaces in a way that only necessary data from the response is utilized, similar to a provided code example. Solution: To achieve this, developers can create interfaces specifying only the required fields, like the "Cart" interface example provided.
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