Skip to content
Back

Can't specify $id when creating a row through a relationship.

  • 0
  • 1
  • Functions
  • Cloud
Camka
10 Oct, 2025, 19:25

When executing

TypeScript
tablesDB.create_row(
  database_id,
  table_id,
  row_id,
  {
    rels=[
    {
      $id=id1,
      node1=id2,
      node2=id3,
    },
    {
      $id=id2,
      node1=id1,
      node2=id3,
    }
    {
      $id=id3,
      node1=id1,
      node2=id2,
    }]
  }
)

When $id is included I get an unauthorized request error. I would really like to have the $id specified since I'm trying to build a graph data type. Otherwise I would have to do a function call for every single item like before, since bulk operations also don't work with tables with relationships.

TL;DR
Database permissions were missing, causing inability to specify $id when creating a row through a relationship. Issue resolved by adding Database permissions to the function.
11 Oct, 2025, 01:02

Figured it out, I had to add Database permissions to my function

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