Skip to content

Conversation

@tom2drum
Copy link
Collaborator

@tom2drum tom2drum commented Nov 4, 2025

Description and Related Issue(s)

Resolves #3008

This PR removes the NEXT_PUBLIC_GRAPHIQL_TRANSACTION environment variable and updates the GraphQL API documentation page to dynamically fetch the latest transaction hash from the API for the example query. If no transactions are available or if there's an error fetching the latest transaction, the component falls back to querying the zero address.

Proposed Changes

  • Removed NEXT_PUBLIC_GRAPHIQL_TRANSACTION environment variable from all configuration files and validator schema
  • Updated GraphQL.tsx component to fetch the latest transaction hash via the general:homepage_txs API endpoint
  • Implemented fallback logic to query the zero address when the latest transaction cannot be retrieved

Environment Variable Changes

  • Removed NEXT_PUBLIC_GRAPHIQL_TRANSACTION: This variable is no longer needed as the latest transaction hash is now obtained dynamically from the API. The GraphQL example query now uses the most recent transaction on the chain, or falls back to querying the zero address if no transactions are available.

Checklist for PR author

  • I have tested these changes locally.
  • I added tests to cover any new functionality, following this guide
  • Whenever I fix a bug, I include a regression test to ensure that the bug does not reappear silently.
  • If I have added, changed, renamed, or removed an environment variable
    • I updated the list of environment variables in the documentation
    • I made the necessary changes to the validator script according to the guide
    • I added "ENVs" label to this pull request

@tom2drum tom2drum added the ENVs label Nov 4, 2025
@tom2drum tom2drum requested a review from isstuev November 4, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GraphQL: use latest tx hash for example query

2 participants