You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i try out this query that you provided for handling pagination for momoka.
query DATransactions {
dataAvailabilityTransactions(request:{limit:1,cursor:null }) {
items {
... on DataAvailabilityPost {
...DAPostFields
__typename
}
}
pageInfo {
__typename
next
prev
}
}
}
fragment DAPostFields on DataAvailabilityPost {
transactionId
submitter
createdAt
appId
profile {
__typename
}
publicationId
__typename
}
i get data (lest call it *1) then i try another query giving result of prev that i get in *1 to the cursor and that gives me correct result (lets call this data *2) and I try this process for several step. (lets call the data i get in step 3 -> *3 and in step 4 -> *4 and in step 5 -> *5)
after that i want to reverse this process and try to get next data step by step but the result was incorrect.
in step 5 i try to get next data by giving next of *5 to the cursor and i expect to get *4 but i got *1.
i mean that it gives the latest data for me (like i give null to the cursor)
The text was updated successfully, but these errors were encountered:
aliad10
changed the title
unexpected behavior in getting prev data
unexpected behavior in getting next data
Sep 20, 2023
Hi @aliad10, it appears like a bug in the pagination logic. We are at the moment in the process of migrating everything to lens-v2 and that logic was modified in the backend codebase so let's hope the bug was also fixed in meantime.
The v2 of the api would reach the production in a couple of weeks and right not it's in beta: https://docs.lens.xyz/v2/docs/introduction https://api-v2-mumbai.lens.dev/playground
The query is now called momokaTransactions (everything that was called dataAvailability* now is momoka* to align better with the underlying tech that supports it.
i try out this query that you provided for handling pagination for momoka.
i get data (lest call it *1) then i try another query giving result of prev that i get in *1 to the cursor and that gives me correct result (lets call this data *2) and I try this process for several step. (lets call the data i get in step 3 -> *3 and in step 4 -> *4 and in step 5 -> *5)
after that i want to reverse this process and try to get next data step by step but the result was incorrect.
in step 5 i try to get next data by giving next of *5 to the cursor and i expect to get *4 but i got *1.
i mean that it gives the latest data for me (like i give null to the cursor)
The text was updated successfully, but these errors were encountered: