bitquery-go: A Production-Minded Go SDK for Bitquery GraphQL
Blockchain data services rarely fail because sending a GraphQL request is difficult. They fail at the seams: a token appears in a log, an overloaded endpoint receives an avoidable retry storm, a large on-chain amount is decoded as an imprecise floating-point number, or a reconnecting stream is treated as exactly-once delivery. These are not glamorous problems, but they are the problems that…
Bitquery-go is a Go SDK aimed at developers who need to build robust blockchain data integrations. It tackles common production challenges like endpoint overloads, token IDs, and floating-point number precision. Unlike many services that struggle with these issues, bitquery-go insists on correctly identifying the API contract you're using.
It offers separate clients for the historical V1 HTTPS GraphQL API and the newer V2 WebSocket API. This distinction matters because the schemas, endpoints, and migration expectations vary significantly between the two versions. The SDK ensures you use the right client for your integration, preventing silent version-switching or fallbacks.
It exposes two client types: v1.Client for the historical HTTPS GraphQL API and v2.Client for the streaming GraphQL API over HTTPS. A separate subscription.Client is used for live V2 updates. This approach ensures you have an accurate, version-specific API contract. bitquery-go also helps you avoid common client pitfalls by surfacing deprecation notices for deprecated networks and clearly separating GraphQL errors from transport failures.
It encourages you to handle errors explicitly, preserving partial data when GraphQL errors are present.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.