The provided documentation outlines the features and capabilities of a Go client library for Goldsky, an Ethereum data platform. Here's a summary of its key functionalities:
-
GraphQL Client:
- The library provides support for both public and private GraphQL queries.
- It includes functionality to handle errors returned by the server in a structured manner (e.g.,
graphQLError.Message). - Example usage shows how to query metadata about indexed blocks.
-
JSON-RPC Support:
- The client supports HTTPS JSON-RPC 2.0, including batch calls.
- It sends the Edge key via an HTTP header (
X-ERPC-Secret-Token) rather than in the URL or endpoint. - Example usage demonstrates how to call
eth_blockNumberand handle responses.
-
Error Handling:
- REST errors are represented using RFC 9457 problem details, allowing for stable error types and status helpers.
- The library provides utilities like
goldsky.AsProblem()to parse and categorize errors based on their type (e.g.,problem.IsNotFound()).
Key Features
- GraphQL Support:
go
1var resp struct { 2 Data
Read the full article at DEV Community
Want to create content about this topic? Use Nemati AI tools to generate articles, social posts, and more.



