Back

Missing Relationships Attributes in some responses

  • 0
  • Self Hosted
  • Tools
  • Databases
ideclon
19 Aug, 2024, 07:29

I have a Collection with two (both two-way) Relationships.

Everything is fine from the Console and my website (both from the frontend and the backend), but when I try to access any Document from the CLI or a script (using node-appwrite), the Relationship Attributes aren't returned.

The CLI is also returning an error ✗ Error Cannot read properties of undefined (reading 'name'). (Neither of the relationships have an Attribute called name, if that helps).

I've tried recreating the Collection, and the issue still occurs. From the other side of the Relationship, there's no issue.

How can I further debug?

(Appwrite 1.5.10, Web SDK 15.0.0, PHP SDK 11.1.0, Node SDK 13.0.0)

TL;DR
Issue: Missing Relationship Attributes in some responses when accessing Document from CLI or script using node-appwrite. Error message: `✗ Error Cannot read properties of undefined (reading 'name')`. Solution: The missing Relationship Attributes could be due to a bug in the node-appwrite SDK. Try updating to a newer version of the SDK to see if the issue persists. Additionally, check the relationship setup to ensure it is correctly defined. Debug by logging the response data to see if the Relationship Attributes are present.
ideclon
19 Aug, 2024, 07:37

Missing Relationships Attributes in some responses

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