Web Developer
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(
'your-database-id',
'your-collection-id'
);
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[]; }