anmot.
anmot.
CCConvex Community
Created by anmot. on 12/11/2024 in #support-community
Edit Panel displays previously selected document instead of current Selection
No description
3 replies
CCConvex Community
Created by anmot. on 10/18/2024 in #support-community
Basic Auth for log stream webhook
No description
5 replies
CCConvex Community
Created by anmot. on 9/6/2024 in #support-community
Convex Auth - /api/auth/ - 404 not found
No description
9 replies
CCConvex Community
Created by anmot. on 9/4/2024 in #support-community
Can we add custom domain to dev convex deployment?
Currently it seems like we can add custom domain only to prod deployments. Are there any plans to extend that to dev deployments as well?
5 replies
CCConvex Community
Created by anmot. on 8/26/2024 in #support-community
Dependent queries not working with tanstack query
Convex query is executed even if the enabled condition is not met.
const { fetchStatus, data: ordersResponse, isError, isPending: isOrderPending, isSuccess } = useQuery({
...convexQuery(api.orders.getOrdersByCartIds, { cartDocIds: cartDocIds ?? [], fetchProducts: true }),
enabled: !!cartDocIds?.length,
});
const { fetchStatus, data: ordersResponse, isError, isPending: isOrderPending, isSuccess } = useQuery({
...convexQuery(api.orders.getOrdersByCartIds, { cartDocIds: cartDocIds ?? [], fetchProducts: true }),
enabled: !!cartDocIds?.length,
});
Query
export const getOrdersByCartIds = zQuery({
args: {
cartDocIds: z.array(zid(CollectionNameEnum.enum.shopping_carts)).min(1),
fetchProducts: z.boolean().optional(),
},
...
export const getOrdersByCartIds = zQuery({
args: {
cartDocIds: z.array(zid(CollectionNameEnum.enum.shopping_carts)).min(1),
fetchProducts: z.boolean().optional(),
},
...
Below is the error
Uncaught ConvexError: {"ZodError":[{"code":"too_small","minimum":1,"type":"array","inclusive":true,"exact":false,"message":"Array must contain at least 1 element(s)","path":["cartDocIds"]}]}
Uncaught ConvexError: {"ZodError":[{"code":"too_small","minimum":1,"type":"array","inclusive":true,"exact":false,"message":"Array must contain at least 1 element(s)","path":["cartDocIds"]}]}
https://tanstack.com/query/latest/docs/framework/react/guides/dependent-queries
6 replies
CCConvex Community
Created by anmot. on 8/2/2024 in #support-community
convexAction in @convex-dev/react-query ?
How can we invoke convex actions using @convex-dev/react-query? PS: loving convex-dev/react-query so far. Great work!
9 replies
CCConvex Community
Created by anmot. on 7/24/2024 in #support-community
zod return validator in convex-helpers?
Are there any plans to add return validator in convex-helpers/server/zod?
11 replies
CCConvex Community
Created by anmot. on 7/13/2024 in #support-community
Does convex support database triggers?
I’m looking for guidance on implementing database triggers. I attempted to manage created, updated, and deleted documents by tracking in each mutation and scheduling actions to handle these changes. However, I soon realized that this approach becomes challenging to manage at scale, especially with more mutations across multiple tables. Is there a centralized method to handle database triggers more efficiently?
7 replies
CCConvex Community
Created by anmot. on 6/21/2024 in #support-community
Can we use zodToConvex with defineEnt when defining ent schema?
Below is the error TS error:
Argument of type 'ObjectValidator<{ name: Validator<string, false, never>; }>' is not assignable to parameter of type 'Record<string, Validator<any, any, any>>'.
Index signature for type 'string' is missing in type 'Validator<{ name: string; }, false, "name">'.t
Argument of type 'ObjectValidator<{ name: Validator<string, false, never>; }>' is not assignable to parameter of type 'Record<string, Validator<any, any, any>>'.
Index signature for type 'string' is missing in type 'Validator<{ name: string; }, false, "name">'.t
npx convex dev error:
InvalidSchema: Hit an error while evaluating your schema:
Invalid validator for key `json`: Not a field validator
InvalidSchema: Hit an error while evaluating your schema:
Invalid validator for key `json`: Not a field validator
Here is the schema
const schema = defineEntSchema({
users: defineEnt({
name: v.string(),
})
.edges("messages", { ref: true }),
messages: defineEnt({
text: v.string()
})
.edge("user"),
tags: defineEnt(zodToConvex(z.object({
name: z.string(),
}))),
});
const schema = defineEntSchema({
users: defineEnt({
name: v.string(),
})
.edges("messages", { ref: true }),
messages: defineEnt({
text: v.string()
})
.edge("user"),
tags: defineEnt(zodToConvex(z.object({
name: z.string(),
}))),
});
5 replies
CCConvex Community
Created by anmot. on 6/5/2024 in #support-community
Logs are missing in the dashboard
No description
3 replies
CCConvex Community
Created by anmot. on 5/31/2024 in #support-community
Failing with InvalidAdminKey when calling HTTP Action with custom Authorization header
Hello team, I’ve created a HTTP action for a third party callers to consume. When the caller passes the Authorization header in the POST request, the API returns InvalidAdminKey. It seems Convex is internally looking for its own Authorization header, which is causing a conflict with the external caller’s header. Can someone please help?
{
"code": "InvalidAdminKey",
"message": "Invalid admin key"
}
{
"code": "InvalidAdminKey",
"message": "Invalid admin key"
}
12 replies