Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the CSV Export to use CursorBasedPagination #35

Open
asishallab opened this issue Jun 8, 2020 · 0 comments
Open

Fix the CSV Export to use CursorBasedPagination #35

asishallab opened this issue Jun 8, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@asishallab
Copy link
Member

Currently our CSV Export of all records works by invoking <DataModelName>s resolvers in an iterative manner. All retrieved records are written into a response stream. This needs to be changed to the usage of Cursor-Based-Pagination <DataModelName>Connection in order to make distributed data models work with this. The reason is that in case of DDMs limit-offset based pagination cannot be implemented.

Adjust the procedure so that the cursor is always set to the last record received from the last iteration, or null, if it is the first iteration. Repeat until pageInfo.hasNextPage is false.

Add a general customizable timeout to it. In globals add a new constant exportTimeoutSeconds which can be set in the environment, too. The default value should be one hour (3600). The user of the cenzontle code generators can set it as liked. If the timeout is reached a respective error is thrown and returned to the user. The stream of course is interrupted.

Add an integration test to verify the export works. The timeout can but must not necessarily be tested.

@asishallab asishallab added the bug Something isn't working label Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants