Should retrieve modified documents of a specified type from the Appwrite database by querying the timestamp.
func fetchModifiedDocuments<T: Codable>(
collectionId: String,
since timestamp: TimeInterval
) async throws -> [AppwriteModels.Document<T>] {
do {
let query = Query.greaterThan("$updatedAt", value: timestamp)
let documents = try await databases.listDocuments(
databaseId: AppwriteConstants.DATABASE_ID,
collectionId: collectionId,
queries: [query],
nestedType: T.self
)
return documents.documents
} catch {
print("Error fetching modified documents: \(error.localizedDescription)")
throw error
}
}
Error
Error fetching modified documents: Invalid query: Query value is invalid for attribute "$updatedAt" Error fetching decks: Invalid query: Query value is invalid for attribute "$updatedAt"
Recommended threads
- Do I need to upgrade my Appwrite plan?
So i am making a file hosting & sharing platform (voltzy.lol) and i am expecting approx 5-8 million visit per month and over 30 million uploads per month do i n...
- updateSession not working anymore
Was something changed recently on Cloud since updateSession is no longer working and I get 400 when calling it, with following error: ``` { "message": "The...
- API returned 400
Hey, since I upgraded to Docker Engine v29 on macOS, I keep getting errors `time="2025-11-26T22:33:36Z" level=error msg="Provider connection error Error respons...