
Hello Appwrite team, currently I am having trouble updating collection documents on GOlang . Can you help me with that?
the README on GitHub is stale while the Quick-Start guide was written for the latest SDK. The README still shows the old v0.6.x API (for Appwrite ≤ 1.3) – e.g. appwrite.NewDatabase(client) and databases.UpdateDocument(collectionID, …) Beginning with sdk-for-go v0.7.0 (released 18 May 2025, compatible with Appwrite 1.7 +), the SDK was regenerated: Service names became plural (NewDatabases, NewUsers, …). All database methods now start with the database ID: CreateDocument(databaseID, collectionID, …) etc. The fluent client builder moved to functional options: appwrite.NewClient(appwrite.WithEndpoint(…), appwrite.WithProject(…), appwrite.WithKey(…)) The Quick-Start page reflects this new API, but the repository README hasn’t been updated yet, so anyone who copies the README code against v0.7.0+ (the default you get with go get github.com/appwrite/sdk-for-go) will see compiler errors.

Issue is fixed, you may. close the ticket.
sdk-for-go v0.7.0 and the user’s credits are updated correctly after every successful “claim” call. What changed sdk-for-go v0.7.0 switched every write-style method (Create, Update, …) to functional-option parameters instead of positional arguments. Only one place in your backend still used the old positional style: databases.UpdateDocument(...) inside handleClaimPurchase.
_, err = databases.UpdateDocument( dbId, appUsersCollectionId, req.CustomerUserID, databases.WithUpdateDocumentData(map[string]interface{}{ "generation_credits": newTotalCredits, }), )
We pass an option produced by WithUpdateDocumentData instead of a raw map
Recommended threads
- No Headers
Hi I have 2 appwrite functions, one is working fine on localhost, second is not even working on prod with https, i inspected the api call, no headers are being ...
- Global Variables
I'm building a Azure DevOps Pipeline Task to deploy my functions to Appwrite using REST APIs. How can I set project global variables via REST? This endpoint do...
- Cannot resolve server
Greetings! Is this a known issue at this time? Cloudflare reports likewise. Please advise, thank you!
