Skip to content

Commit 310ade4

Browse files
authored
Regenerate codegen (#151)
1 parent be7a716 commit 310ade4

File tree

3 files changed

+12
-30
lines changed

3 files changed

+12
-30
lines changed

example/convex/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Welcome to your Convex functions directory!
22

3-
Write your Convex functions here. See https://docs.convex.dev/functions for
4-
more.
3+
Write your Convex functions here.
4+
See https://docs.convex.dev/functions for more.
55

66
A query function that takes two arguments looks like:
77

88
```ts
9-
// functions.js
9+
// convex/myFunctions.ts
1010
import { query } from "./_generated/server";
1111
import { v } from "convex/values";
1212

@@ -36,7 +36,7 @@ export const myQueryFunction = query({
3636
Using this query function in a React component looks like:
3737

3838
```ts
39-
const data = useQuery(api.functions.myQueryFunction, {
39+
const data = useQuery(api.myFunctions.myQueryFunction, {
4040
first: 10,
4141
second: "hello",
4242
});
@@ -45,7 +45,7 @@ const data = useQuery(api.functions.myQueryFunction, {
4545
A mutation function looks like:
4646

4747
```ts
48-
// functions.js
48+
// convex/myFunctions.ts
4949
import { mutation } from "./_generated/server";
5050
import { v } from "convex/values";
5151

@@ -65,15 +65,15 @@ export const myMutationFunction = mutation({
6565
const id = await ctx.db.insert("messages", message);
6666

6767
// Optionally, return a value from your mutation.
68-
return await ctx.db.get(id);
68+
return await ctx.db.get("messages", id);
6969
},
7070
});
7171
```
7272

7373
Using this mutation function in a React component looks like:
7474

7575
```ts
76-
const mutation = useMutation(api.functions.myMutationFunction);
76+
const mutation = useMutation(api.myFunctions.myMutationFunction);
7777
function handleButtonPress() {
7878
// fire and forget, the most common way to use mutations
7979
mutation({ first: "Hello!", second: "me" });
@@ -85,6 +85,6 @@ function handleButtonPress() {
8585
}
8686
```
8787

88-
Use the Convex CLI to push your functions to a deployment. See everything the
89-
Convex CLI can do by running `npx convex -h` in your project root directory. To
90-
learn more, launch the docs with `npx convex docs`.
88+
Use the Convex CLI to push your functions to a deployment. See everything
89+
the Convex CLI can do by running `npx convex -h` in your project root
90+
directory. To learn more, launch the docs with `npx convex docs`.

example/convex/_generated/dataModel.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export type Doc<TableName extends TableNames> = DocumentByName<
3838
* Convex documents are uniquely identified by their `Id`, which is accessible
3939
* on the `_id` field. To learn more, see [Document IDs](https://docs.convex.dev/using/document-ids).
4040
*
41-
* Documents can be loaded using `db.get(id)` in query and mutation functions.
41+
* Documents can be loaded using `db.get(tableName, id)` in query and mutation functions.
4242
*
4343
* IDs are just strings at runtime, but this type can be used to distinguish them from other
4444
* strings when type checking.

package-lock.json

Lines changed: 1 addition & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)