Inserting into a reference field returns 'Reference Broken' error

Hi there,

Inserting to a reference fields seems to have weird behavior, for example, when inserting an object like this:

let item { // referenced fields
    userId: user.id, // Worked fine.
    ipDetails: ipAddress // Gives a reference broken error
}

Each field from the above is the main field and represent its collection when referring to it, there’s definitely a user that has this ID, since it was taken from that collection anyway, and the ipDetails field that represents the IP Addresses collection definitely has the exact IP address that I’m trying to insert.

The code runs on the Backend with supress authentication, so permissions is not the issue here.

I’ve made this post short unlike my previous post.

Any help is appreciated.
Ahmad

1 Like

Did you find a solution? I’m having the same issue.

Shan has provided the solution and the reason of this error.

Take a look at his answer here.