Back

Relation attribute name

  • 1
  • Databases
  • General
Мухаммадамин
26 Jan, 2024, 11:51

Is it possible to set a custom name to the relation attribute when getting a list of documents?

Here boardId is an object, but in the cloud, it contains just a string which is ID of a board.

As I'm using TS, it would be easy to manage if there is a possible way to change the name when fetching documents: like

TypeScript
{ 
  boardId: "asd9e12hdasde12",
  board: {
      $id: "a1h23bjhb1",
      name: "BoardName"
  }
}
TL;DR
Is there a way to set a custom name for the relation attribute when getting a list of documents? In the example provided, `boardId` is an object but in the cloud, it only contains a string which is the board ID. Solution: It would be helpful if there was a way to change the name when fetching documents, such as: ``` { boardId: "asd9e12hdasde12", board: { $id: "a1h23bjhb1", name: "BoardName" } } ```
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