-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Description
👟 Reproduction steps
After recently upgrading Appwrite from 1.3.7 to 1.4.1 and running the migrations we experienced some issues with the Flutter SDK (v10.0.1) complaining about missing fields.
The only system fields sent by Appwrite and received by the SDK are "$databaseId", $collectionId".
The code to list the documents is the following:
Future<List<Group>> _getGroupList() async {
final groupDocuments = await _databases.listDocuments(
databaseId: appwriteDatabaseId,
collectionId: groupCollectionId,
queries: [
Query.orderDesc("\$createdAt"),
Query.select(["groupName", "owner", "members", "description"])
]);
return groupDocuments.documents
.map((document) => Group.fromAppwriteDocument(document.data))
.toList();
}As @stnguyen90 indicated on Discord, I tried to include the system attributes manually and that seems to fix the issue:
Query.select([
"groupName",
"owner",
"members",
"description",
"$updatedAt",
"$createdAt",
"$id",
"$permissions"
])👍 Expected behavior
A call to listDocuments does not raise errors when using a Query.select without including system attributes.
👎 Actual Behavior
A TypeError is raised by the SDK indicating that system attributes received such as $permissions are Null, but are mandatory to construct the client document.
🎲 Appwrite version
Version 1.4.x
💻 Operating system
Linux
🧱 Your Environment
Appwrite 1.4.1 recently upgraded from 1.3.7.
Flutter Client using Appwrite Flutter SDK 10.0.1
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
