0.0.67 • Published 2 years ago

@convex-dev/server v0.0.67

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@convex-dev/server

Server library for Convex functions to interact with data in the Convex Cloud.

Usage

Convex functions are defined by using either the query or mutation functions.

Queries receive a db that implements the DatabaseReader interface.

import { query } from "@convex-dev/server";

export default query(async ({ db }, ...args: any[]): Promise<any> => {
  // Your (read-only) code here!
});

If your function needs to write to the database, such as inserting, updating, or deleting documents, use mutation instead which provides a db that implements the DatabaseWriter interface.

import { mutation } from "@convex-dev/server";

export default mutation(async ({ db }, ...args: any[]): Promise<any> => {
  // Your mutation code here!
});

See the Convex Getting Started guide for more details on how to get started.

See also

0.0.62

2 years ago

0.0.67

2 years ago

0.0.55

2 years ago

0.0.56

2 years ago

0.0.51

2 years ago

0.0.50

2 years ago

0.0.48

2 years ago

0.0.45

2 years ago

0.0.44

2 years ago

0.0.42

2 years ago

0.0.36

2 years ago

0.0.35

2 years ago

0.0.34

2 years ago

0.0.33

2 years ago

0.0.32

2 years ago

0.0.29

2 years ago

0.0.27

2 years ago