unsphere
unsphere
CCConvex Community
Created by unsphere on 10/9/2024 in #support-community
How to use Buffer in httpRouter?
ah great. thats it. thank you tom!
4 replies
CCConvex Community
Created by unsphere on 9/3/2024 in #support-community
How to obtain cookies in Convex Auth ConvexCredentials authorize?
Ah yeah, totally forgot the third party cookie aspect. Thanks. I solved it now by using convex helper sessions and will post a full example repo here soon.
3 replies
CCConvex Community
Created by mrvdot on 12/13/2023 in #general
HIPAA / Project management API
Looking forward to the priority of GDPR and HIPAA. I need both for 2 projects next year!
7 replies
CCConvex Community
Created by unsphere on 11/5/2023 in #support-community
Multiple queries suggestion
yes okay then I will wait for the skip feature for pagination. As far I can see there is no possibility to have a paginate query with joins to user and follows or? because .paginate(args.paginationOpts) needs to be returned from the query. So I need to query the user and follows inside the ticket view.
15 replies
CCConvex Community
Created by unsphere on 11/5/2023 in #support-community
Multiple queries suggestion
@jamwt sure there you go:
export default defineSchema({
users: defineTable({
clerkId: v.string(),
username: v.string(),
imageUrl: v.optional(v.string()),
})
.index('byClerkId', ['clerkId'])
.index('byUsername', ['username']),
tickets: defineTable({
authorId: v.id('users'),
receiverId: v.id('users'),
message: v.optional(v.string()),
isPrioritized: v.boolean(),
isActive: v.boolean(),
isProcessed: v.boolean(),
startDate: v.optional(v.number()),
endDate: v.optional(v.number()),
})
.index('byAuthorId', ['authorId'])
.index('byReceiverId', ['receiverId'])
.index('byReceiverIdAndIsActive', ['receiverId', 'isActive'])
.index('byReceiverIdAndIsPrioritized', ['receiverId', 'isPrioritized'])
.index('byReceiverIdAndIsProcessed', ['receiverId', 'isProcessed'])
.index('byReceiverIdAndIsActiveAndIsPrioritizedAndIsProcessed', [
'receiverId',
'isActive',
'isPrioritized',
'isProcessed',
]),
follows: defineTable({
followerId: v.id('users'),
ticketId: v.id('tickets'),
})
.index('byFollowerId', ['followerId'])
.index('byTicketId', ['ticketId'])
.index('byFollowerIdAndTicketId', ['followerId', 'ticketId']),
});
export default defineSchema({
users: defineTable({
clerkId: v.string(),
username: v.string(),
imageUrl: v.optional(v.string()),
})
.index('byClerkId', ['clerkId'])
.index('byUsername', ['username']),
tickets: defineTable({
authorId: v.id('users'),
receiverId: v.id('users'),
message: v.optional(v.string()),
isPrioritized: v.boolean(),
isActive: v.boolean(),
isProcessed: v.boolean(),
startDate: v.optional(v.number()),
endDate: v.optional(v.number()),
})
.index('byAuthorId', ['authorId'])
.index('byReceiverId', ['receiverId'])
.index('byReceiverIdAndIsActive', ['receiverId', 'isActive'])
.index('byReceiverIdAndIsPrioritized', ['receiverId', 'isPrioritized'])
.index('byReceiverIdAndIsProcessed', ['receiverId', 'isProcessed'])
.index('byReceiverIdAndIsActiveAndIsPrioritizedAndIsProcessed', [
'receiverId',
'isActive',
'isPrioritized',
'isProcessed',
]),
follows: defineTable({
followerId: v.id('users'),
ticketId: v.id('tickets'),
})
.index('byFollowerId', ['followerId'])
.index('byTicketId', ['ticketId'])
.index('byFollowerIdAndTicketId', ['followerId', 'ticketId']),
});
And I forgot to mention that I also need to include the author for each ticket to show username and image and how much followers each ticket has.
15 replies
CCConvex Community
Created by zid on 11/5/2023 in #support-community
split for paginated queries
yeah skip für paginated queries would be nice. I am facing the need for it in my actual use case as well.
4 replies