Back Link

Back Link attribute is used in a query result struct. It indicates that the field's value is the result of a backlink.

  #[back_link(module, source_table, target_table, target_column)]

ArgumentOptionalDescription
moduleyesThe edgeDB module.

By default : 'default'
source_tablenoThe backlink source table name
target_tablenoThe backlink target table name
target_columnnoThe backlink target column name

Usage

    struct UserResult {
       #[back_link(
            module="users",
            source_table="User",
            target_table="Friend",
            target_column="friend"
        )]
        friend: Friend,
    }