Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

Functions

Functions run on the backend and are written in JavaScript (or TypeScript). Theyare automatically available as APIs accessed throughclient libraries. Everything you do in the Convex backendstarts from functions.

There are three types of functions:

  • Queries read data from your Convex databaseand are automatically cached and subscribable (realtime, reactive).
  • Mutations write data to the database andrun as a transaction.
  • Actions can call OpenAI, Stripe, Twilio, or anyother service or API you need to make your app work.

You can also buildHTTP actions when you want tocall your functions from a webhook or a custom client.

Here's an overview of the three different types of Convex functions and whatthey can do:

QueriesMutationsActions
Database accessYesYesNo
TransactionalYesYesNo
CachedYesNoNo
Real-time UpdatesYesNoNo
External API Calls (fetch)NoNoYes

[8]ページ先頭

©2009-2025 Movatter.jp