#convex/server doesn't export paginationResultValidator
1 messages · Page 1 of 1 (latest)
Hi @compact aurora. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Based on the knowledge sources, I can confirm that paginationResultValidator is documented in the API reference for the server module. According to the API documentation, paginationResultValidator is a validator factory for PaginationResult that you can use to create validators for paginated query results.
However, the knowledge sources do not explicitly mention whether this validator is actually exported from convex/server or if there's a discrepancy between the documentation and the actual exports. The documentation shows it should be available at server/pagination.ts:162, but I cannot verify from the provided sources whether it's properly exported in the package.
If you're experiencing an import error, you might want to:
- Check if you need to import it from a different path
- Verify your Convex package version matches the documentation
- Consider using
v.any()as a temporary workaround for thereturnsparameter, though this is less type-safe
The knowledge sources show that argument and return value validators are important for security and type safety, so having proper validators for pagination results would be valuable. If this is indeed missing from the exports, it may be worth reporting as an issue to the Convex team.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@compact aurora Kapa.ai is still learning and improving, please let me know how I did by reacting below.
@timid orbit This was added in a very recent release that I hadn't upgraded to yet, resolved!
Let me check the knowledge base for you again. One moment! :books:
Great! I'm glad to hear that upgrading to the latest version of Convex resolved the issue with paginationResultValidator not being exported from convex/server.