unsphere
CCConvex Community
•Created by unsphere on 10/9/2024 in #support-community
How to use Buffer in httpRouter?
Some npm packages I need rely on Buffer and I am already using "use node" for convexAuth ConvexCredentials that is working fine. But then I get the following error:
Using "use node" inside of the httpRouter file where the ConvexAuth http actions will be consumed is not allowed.
Any idea?
4 replies
CCConvex Community
•Created by unsphere on 9/3/2024 in #support-community
How to obtain cookies in Convex Auth ConvexCredentials authorize?
Hi there, is it somehow possible to get the cookies inside ConvexCredentials authorize? I need to get them to verify the credentials. In NextAuth there is the req parameter in authorize. Your http actions have it as well.
3 replies
CCConvex Community
•Created by unsphere on 12/5/2023 in #support-community
Using solc inside actions
I want to use the solc lib inside functions. The lib has dependencies to fs or path. I already put "use node" on top with only actions inside and still get the following error. I will not use any function from solc that uses fs and others.
✘ [ERROR] Could not resolve "fs"
node_modules/solc/soljson.js:115:21:
115 │ fs = require("fs");
╵ ~~~~
The package "fs" wasn't found on the file system but is built into node. Are you trying
to bundle for node? You can use "platform: 'node'" to do that, which will remove this
error.
2 replies
CCConvex Community
•Created by unsphere on 11/5/2023 in #support-community
Multiple queries suggestion
I have a queue list and thinking about the best query design, performance and resources wise.
The queue displays tickets as follows:
1. active (one)
2. prioritized (multiple) creation time asc
3. in queue (multiple) creation time asc
4. processed (multiple) processed time desc
I am also thinking about pagination for prioritized, in queue and processed ones so that the user sees the active one + 20 after that in the order specified on top and on scroll i load 20 more either prioritized ones if not end reached or in queue ones if not end reached and so on.
Should I create 4 queries with indexes including pagination leveraging skip feature if end is reached of the previous query or should I put all in one like:
15 replies