Skip to content
Back

Relationship fields returning "$sequence" key when field was not requested (Query.select)

  • 0
  • Cloud
tneot01
29 Jul, 2025, 20:54

It looks like today something changed in the backend, I have a project that has certain collections only accessible to teams with specific permissions. Sometimes, these collections are linked to other collections via relationships, so in my client side code I am not selecting the field to be returned when the user doesn't have the permission based on their team. However, now I am seeing even though I did not select the field to be returned, appwrite still returns the following:

TypeScript
"relationship_field": {"$sequence": 0}

This is causing my app to throw errors because it tries to parse this into an object but doesn't have any of the fields it is expecting. Of course I can fix and account for this on my side but not sure if this is intended behavior now.

Previously it would either return null or just an empty structure when not requesting that field

TL;DR
Developers are experiencing an issue where relationship fields they did not request are being returned with a "$sequence" key. This behavior change may be related to backend updates. Although developers can adjust their code to account for this, the unexpected return values are causing parsing errors. The issue may be due to the experimental nature of relationships in the API.
Steven
29 Jul, 2025, 20:57

Fyi, relationships are experimental and should be used with caution as they may lead to performance issues and the behavior/API may change

Steven
29 Jul, 2025, 20:59

So you're not selecting the relationship_field but it's being returned?

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