Rakesh Roushan
Rakesh Roushan12mo ago

query error

export const getStore = query({ args: { storeId: v.id("stores") }, handler: async (ctx, args) => { const store = await ctx.db.get(args.storeId); console.log(store); }, }); I have done this part But how to access this api in page.tsx as on writing it gives error
No description
8 Replies
erquhart
erquhart12mo ago
Welcome! Are you running npx convex dev?
Rakesh Roushan
Rakesh RoushanOP12mo ago
yes function is built of getStore but not able to access the function in page.tsx
erquhart
erquhart12mo ago
Okay, and the getStore() query is in convex/stores.ts? oh the error is probably saying you have to pass an args object should have asked you to paste the error message
Rakesh Roushan
Rakesh RoushanOP12mo ago
yes yeah done , resolved
Rakesh Roushan
Rakesh RoushanOP12mo ago
No description
erquhart
erquhart12mo ago
Sweet
Rakesh Roushan
Rakesh RoushanOP12mo ago
thanks
Rakesh Roushan
Rakesh RoushanOP12mo ago
Hello, I am getting this error in console while it is accessing the api and convex functions are ready.
No description

Did you find this page helpful?