There are three types of functions:
- Queries read data from your Convex database and are automatically cached and subscribable (realtime, reactive).
- Mutations write data to the database and run as a transaction.
- Actions can call Open AI, Stripe, Twilio, or any other service or API you need to make your app work.
You can also build HTTP actions when you want to call your functions from a webhook or a custom client.