Ica
Ica
CCConvex Community
Created by stefano on 5/29/2024 in #general
Eliminating redundant auth checks
Thanks. Managed to make it work as you suggested.
20 replies
CCConvex Community
Created by stefano on 5/29/2024 in #general
Eliminating redundant auth checks
How do I handle it in Front End? If I use useQuery (/convex/react I keep getting the Convex Error in the UI: Error: [CONVEX Q(example:getData)] [Request ID: ] Server Error Uncaught Error: Authentication required .
"use client"

export default function App(){
const data = useQuery(api.example.getData, {});

return (
...map data
)
}
"use client"

export default function App(){
const data = useQuery(api.example.getData, {});

return (
...map data
)
}
example.ts
export const getData = query(
args: {},
async handler(ctx, args) {
const identity = await ctx.auth.getUserIdentity();

if(!identity)
throw new ConvexError("Authentication required");

const examples = await ctx.db.query("example").collect();
return PromiseAll(examples)
}
);
export const getData = query(
args: {},
async handler(ctx, args) {
const identity = await ctx.auth.getUserIdentity();

if(!identity)
throw new ConvexError("Authentication required");

const examples = await ctx.db.query("example").collect();
return PromiseAll(examples)
}
);
20 replies
CCConvex Community
Created by Ica on 5/26/2024 in #general
import & export improvements
I'll try it out. Thank you
7 replies
CCConvex Community
Created by Ica on 5/26/2024 in #general
import & export improvements
Fair enough.
7 replies
CCConvex Community
Created by Ica on 5/26/2024 in #general
import & export improvements
ex of data pump oracle. expdp system/password@db10g full=Y directory=TEST_DIR dumpfile=full.dmp logfile=expdp_full.log query='SCOTT.EMP:"WHERE deptno=0",SCOTT.DEPT:"WHERE deptno=0"'
7 replies
CCConvex Community
Created by Ica on 5/26/2024 in #general
import & export improvements
in the context of Oracle Database, the meta-data only export was referring to the structure of the table; like exporting an empty table. ex. You wanted to create a new env and have all the tables from a different one. So you would do an export schema meta-data and then import in the new env. You'll have the schema prepared. Was that specified in the docs and I somehow missed it?
7 replies
CCConvex Community
Created by Ica on 5/23/2024 in #general
convex query security
Thank you
2 replies
CCConvex Community
Created by Ica on 5/22/2024 in #general
Text search features
No description
4 replies
CCConvex Community
Created by Ica on 5/22/2024 in #general
Text search features
Searching across multiple fields. I apply certain filters when getting data from a table, and as the table grows, probably the best way would be to use a searchIndex on multiple fields
4 replies