GraphQL: use latest tx hash for example query #3096
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description and Related Issue(s)
Resolves #3008
This PR removes the
NEXT_PUBLIC_GRAPHIQL_TRANSACTIONenvironment 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
NEXT_PUBLIC_GRAPHIQL_TRANSACTIONenvironment variable from all configuration files and validator schemaGraphQL.tsxcomponent to fetch the latest transaction hash via thegeneral:homepage_txsAPI endpointEnvironment Variable Changes
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