alerdenisov
alerdenisov
CCConvex Community
Created by alerdenisov on 12/18/2024 in #general
Hello again, do convex have any examples
No description
10 replies
CCConvex Community
Created by alerdenisov on 12/18/2024 in #general
Hello again, do convex have any examples
No description
10 replies
CCConvex Community
Created by alerdenisov on 12/18/2024 in #general
Hello again, do convex have any examples
I managed to implement prefetched @tanstack/react-queries with nextjs! I would love to share some minimal example code, do you have dedicated repo for examples to make PR?
10 replies
CCConvex Community
Created by alerdenisov on 12/18/2024 in #general
Hello again, do convex have any examples
Okay. Can I use queryClient.setQueryData together with prefetchQuery? See only one obstacle is hashFn used for queryKey. But accordingly to source code implementation isn't complex
10 replies
CCConvex Community
Created by alerdenisov on 12/18/2024 in #general
Hello again, do convex have any examples
function getServerQueryClient() {
const convexQueryClient = new ConvexQueryClient(env.NEXT_PUBLIC_CONVEX_URL);
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 1000 * 60,
queryKeyHashFn: convexQueryClient.hashFn(),
queryFn: convexQueryClient.queryFn(),
},
},
});
convexQueryClient.connect(queryClient);

return queryClient;
}
function getServerQueryClient() {
const convexQueryClient = new ConvexQueryClient(env.NEXT_PUBLIC_CONVEX_URL);
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 1000 * 60,
queryKeyHashFn: convexQueryClient.hashFn(),
queryFn: convexQueryClient.queryFn(),
},
},
});
convexQueryClient.connect(queryClient);

return queryClient;
}
10 replies
CCConvex Community
Created by Squirble on 12/16/2024 in #general
I don't understand your question
Here is more detailed explanation of my concern: 1) I have many-to-many relation done with dedicated table. Projects <-> Manages <-> Users 2) During fetching project data I do indexed search of manage's records with withIndex("by_project", args.id) 3) I need to fetch all users from received list of manages records. Currently I see only one option: use map over ids and separate queries for each. In short: I'm looking for something such as: db.query('users').withIndex("by_id", q => q.in("_id", userIds))
4 replies
CCConvex Community
Created by alerdenisov on 12/13/2024 in #general
I disabled all extensions (literally all
I just update all dependencies to latest versions and it helped
2 replies