ballingt
ballingt15mo ago

Yep, you can organize these exactly like

Yep, you can organize these exactly like this! Then on the client you'd use api.transactions.queries.yourQueryName to specify the query named yourQueryName exported from convex/transactions/queries.ts
8 Replies
wjarjoui
wjarjoui15mo ago
OK good to know. I just tried it however and I do not see my functions in the web dashboard (after running npx..) I do not have much javascript experience though, so if I'm supposed to have an index file or do something to initialize the transactions, I did not do it
ballingt
ballingtOP15mo ago
WHat's the output of npx convex dev -v look like? (this should list all the files that are found)
wjarjoui
wjarjoui15mo ago
Codegen finished.
Skipping dotfile convex/.whitelist.ts.swp
Skipping convex/README.md
Skipping convex/_generated/api.d.ts
Skipping convex/_generated/api.js
Skipping convex/_generated/dataModel.d.ts
Skipping convex/_generated/server.d.ts
Skipping convex/_generated/server.js
Skipping dotfile convex/contracts/.tuberProxy.ts.swp
Preparing convex/contracts/tuberProxy.ts
Preparing convex/contracts.ts
Preparing convex/http.ts
Preparing convex/priceEvents.ts
Skipping convex/schema.ts
Preparing convex/transactions.ts
Skipping convex/tsconfig.json
Preparing convex/tuberProxy.ts
Preparing convex/wallets.ts
Preparing convex/whitelist.ts
Convex's runtime modules: [
'contracts/tuberProxy.js',
'contracts.js',
'http.js',
'priceEvents.js',
'transactions.js',
'tuberProxy.js',
'_deps/7EONDGZR.js',
'_deps/C77KAUHN.js',
'wallets.js',
'whitelist.js',
'_deps/2RGTIWXI.js',
'_deps/NW34CHCT.js'
]
Node.js runtime modules: []
Node.js runtime external dependencies (to be installed on the server): []
Function push skipped: Config already synced.
✔ 21:07:14 Convex functions ready! (5.62s)
Codegen finished.
Skipping dotfile convex/.whitelist.ts.swp
Skipping convex/README.md
Skipping convex/_generated/api.d.ts
Skipping convex/_generated/api.js
Skipping convex/_generated/dataModel.d.ts
Skipping convex/_generated/server.d.ts
Skipping convex/_generated/server.js
Skipping dotfile convex/contracts/.tuberProxy.ts.swp
Preparing convex/contracts/tuberProxy.ts
Preparing convex/contracts.ts
Preparing convex/http.ts
Preparing convex/priceEvents.ts
Skipping convex/schema.ts
Preparing convex/transactions.ts
Skipping convex/tsconfig.json
Preparing convex/tuberProxy.ts
Preparing convex/wallets.ts
Preparing convex/whitelist.ts
Convex's runtime modules: [
'contracts/tuberProxy.js',
'contracts.js',
'http.js',
'priceEvents.js',
'transactions.js',
'tuberProxy.js',
'_deps/7EONDGZR.js',
'_deps/C77KAUHN.js',
'wallets.js',
'whitelist.js',
'_deps/2RGTIWXI.js',
'_deps/NW34CHCT.js'
]
Node.js runtime modules: []
Node.js runtime external dependencies (to be installed on the server): []
Function push skipped: Config already synced.
✔ 21:07:14 Convex functions ready! (5.62s)
ballingt
ballingtOP15mo ago
also could you show what a few lines of the queries.ts file looks like, include an export? Is convex/contracts/tuberProxy.ts the one you expect to see here?
wjarjoui
wjarjoui15mo ago
no, but the functions I do not see in the dashboard are defined in contracts/tuberProxy.js oh one sec maybe the export are http actions only included in the dashboard if they are registered in the convex/http file?
ballingt
ballingtOP15mo ago
Ah yes, http actions must be in the http.ts file. You can define them elsewhere and then import them in convex/http.ts and add the routes there, but the actual http object needs to be exported from convex/http.ts.
wjarjoui
wjarjoui15mo ago
got it ok let me try with a normal query then that did it. Thank you! hey small question - any way we can use a different filename for the convex.json file? Autocomplete for the convex/ directory is always prompting between these two options
ballingt
ballingtOP15mo ago
Great idea, possible workaround for now would be naming your convex folder something different by setting the functionsDir key in convex.json. It's not out of the question to check two locations for convex.json though, feedback noted.

Did you find this page helpful?