Starlord
Starlord
CCConvex Community
Created by Starlord on 12/20/2024 in #support-community
Debug Production
Hello, I have run into a situation where a user has a problem / bug in production environment. Is there a way to copy production environment into development? what would be the best way to login as this user and to simulate his connection?
12 replies
CCConvex Community
Created by Starlord on 12/18/2024 in #support-community
pagination query 2 server requests on start
hello. please explain why paginated query is executing 2 times on first execution even it is exhausted? it think the problem is with convex source code: First execution: Gets the initial page of results Second execution: Checks if there are more items after the current page its doing second request even if first is already 'Exhausted'
export default function NewProductPage() {
const result = usePaginatedQuery(
api.admin.listOwnPendingProducts,
{},
{ initialNumItems: 10 }
);

useEffect(() => {
console.log('Query state changed:', {
status: result.status,
productsLength: result.results?.length,
isLoading: result.isLoading,
results: result.results
});
}, [result]);

return null;
}
export default function NewProductPage() {
const result = usePaginatedQuery(
api.admin.listOwnPendingProducts,
{},
{ initialNumItems: 10 }
);

useEffect(() => {
console.log('Query state changed:', {
status: result.status,
productsLength: result.results?.length,
isLoading: result.isLoading,
results: result.results
});
}, [result]);

return null;
}
Query state changed: {status: 'LoadingFirstPage', productsLength: 0, isLoading: true, results: Array(0)}
Query state changed: {status: 'LoadingFirstPage', productsLength: 0, isLoading: true, results: Array(0)}
eruda.js?v=374bd0d1:3361 [CONVEX Q(admin:listOwnPendingProducts)] [LOG] 'listOwnPendingProducts executed on backend'
Query state changed: {status: 'Exhausted', productsLength: 1, isLoading: false, results: Array(1)}
eruda.js?v=374bd0d1:3361 [CONVEX Q(admin:listOwnPendingProducts)] [LOG] 'listOwnPendingProducts executed on backend'
Query state changed: {status: 'Exhausted', productsLength: 1, isLoading: false, results: Array(1)}
Query state changed: {status: 'LoadingFirstPage', productsLength: 0, isLoading: true, results: Array(0)}
Query state changed: {status: 'LoadingFirstPage', productsLength: 0, isLoading: true, results: Array(0)}
eruda.js?v=374bd0d1:3361 [CONVEX Q(admin:listOwnPendingProducts)] [LOG] 'listOwnPendingProducts executed on backend'
Query state changed: {status: 'Exhausted', productsLength: 1, isLoading: false, results: Array(1)}
eruda.js?v=374bd0d1:3361 [CONVEX Q(admin:listOwnPendingProducts)] [LOG] 'listOwnPendingProducts executed on backend'
Query state changed: {status: 'Exhausted', productsLength: 1, isLoading: false, results: Array(1)}
12 replies
CCConvex Community
Created by Starlord on 12/18/2024 in #support-community
Force logout user / invalidate JWT token
Hello, is it possible to force logout user / invalidate JWT Token on the backend side to make player need to login again?
35 replies
CCConvex Community
Created by Starlord on 12/13/2024 in #support-community
mutation doesnt rollback query state on failure
No description
22 replies