useAppwrite()

nuxt3-appwrite provides a composable giving access to Appwrite Client SDK.

Provided functions

For full reference on how to use the following features, check the official Appwrite documentation

  • Client
  • Databases
  • Account
  • Storage
  • Avatars
  • Functions
  • Role
  • Permission

Exemples

Get current account

<script setup lang="ts">const client = useAppwrite()const user = await client.account.get()</script>

Query document

<script setup lang="ts">const client = useAppwrite()const user = await client.databases.getDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]');</script>