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

Difficulty Querying Events with the after Parameter in Stargaze(constellation) GraphQL API #11

Open
prince-hope1975 opened this issue Feb 22, 2024 · 0 comments

Comments

@prince-hope1975
Copy link

prince-hope1975 commented Feb 22, 2024

I am attempting to use the Stargaze GraphQL API to query events for specific contract addresses using the events query. While I can successfully query events using the forContractAddrs parameter, I encounter difficulties when trying to utilize the $after variable to paginate through results.

query EventsFor(
  $forContractAddrs: [String!],
  $after: String,
) {
  events(
    forContractAddrs: $forContractAddrs,
    sortBy: BLOCK_HEIGHT_ASC
    after: $after
  ) {
    edges {
      node {
        createdAt
        eventName
        action
        data
        action
        id
      }
    }
  }
}

I'd like to understand what type of data goes in the after variable. I have tried using the standard timestamp format returned by the constellation API, but that doesn't seem to work

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

1 participant