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

unexpected behavior in getting next data #49

Open
aliad10 opened this issue Sep 20, 2023 · 1 comment
Open

unexpected behavior in getting next data #49

aliad10 opened this issue Sep 20, 2023 · 1 comment

Comments

@aliad10
Copy link

aliad10 commented Sep 20, 2023

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)

@aliad10 aliad10 changed the title unexpected behavior in getting prev data unexpected behavior in getting next data Sep 20, 2023
@desfero
Copy link
Collaborator

desfero commented Sep 21, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants