Cardano GraphQL 5.0.0
This major release improves the efficiency and reliability of the service by utilising Ogmios as the node interface, replacing cardano-cli
and implementing a chain-sync client for discovering assets upon first mint in favour of regularly diffing a large data set. A PostgreSQL-backed queue helps achieve this, and can be observed within the pgboss
schema. The docker-compose
stack now uses cardano-node-ogmios
as a drop-in replacement for cardano-node
, and enables all communication from the cardano-graphql
service to be done via TCP. There are a number of small features, and bug fixes listed below. Please follow the upgrade instructions in the Wiki
Compatible with:
cardano-node
:1.27.0
cardano-db-sync
:10.0.1
- Note: The database must be recreated using the new version. See the Wiki for instructions.hasura/graphql-engine
:1.3.3
⚠ BREAKING CHANGES
Asset.assetName
andAsset.assetId
are now typed asHex
, as the relationship fromAssets
toTokenMints
needed to be established using the underlying table, whereassetId
is not present.- Configuration of the asset metadata fetching is now a single value.
POLLING_INTERVAL_METADATA_SYNC_INITIAL
andPOLLING_INTERVAL_METADATA_SYNC_ONGOING
are replaced byASSET_METADATA_UPDATE_INTERVAL
, which is the number of seconds before the service checks the registry for updates. - AssetSupply.total is now an optional field and can return null.
- Transaction.metadata is now
JSON
type, notJSONObject
- Despite the name,
JSONObject
was mapped to the underlying JSON resolver as a workaround to avoid breaking changes.
- Despite the name,
- The fields previously modeled on Token have been nested under Token.asset
tokens
andtokens_aggregate
have been removed in favour ofassets
andassets_aggregate
- Asset properties nested under
PaymentAddress.assets
are now underPaymentAddress.assets.asset
Block.merkleRoot
removed, as no longer part ofcardano-db-sync
schema. (8b3b718)
Features
- Replaces the use of
cardano-cli
with Ogmios for interacting with the node using JSON-WSP, and implements the convenientcardano-node-ogmios
Docker image as a drop-in replacement for thecardano-node
image. - Sync assets using chain-sync protocol via Ogmios (784509e)
tokenMints
andtokenMints_aggregate
queries (f803b94)- Add query complexity validations (24a14a9),
- Add default query complexity calculations with arguments (b16c77d)
- Implement complexity in resolvers (5664a55)
- Use cardano-node config for lastConfiguredMajorVersion (5a621c2), closes #454
- Add Epoch_bool_exp.startedAt (4cc580a)
- Add TransactionOutput_bool_exp.index (34d5438)
- Allow ordering of assets by token mint count (cfbb039)
- Asset metadata decimals (082f509)
Bug Fixes
- Improve startup robustness (7054a59)
- The GraphQL server is now delayed until all modules are initialized, and running. If
cardano-db-sync
reboots, all
modules are shutdown, and restarted and therefore links the server availability with a fully initialized stack.
- The GraphQL server is now delayed until all modules are initialized, and running. If
- Add order_by to asset query (5848c24)
- Asset_bool_exp.tokenMints (7616a49)
- assetFingerprint bug when no assetName present (9a61d91), closes #487
- Await all promises in shutdown function (3d7ef11)
- Await CardanoNodeClient init before starting server (f33f6aa)
- cardanoDbSyncMeta.initialized during startup (d6649cf)
- Casing on invalid hereafter in GraphQL schema (854ec4a), closes #390
- Copy cardano-node config into Docker image (4bf4866)
- Default metadata server URI (2a98055)
- Disable CORS in Hasura graphql-engine (4499422), closes #392
- Ensure DB is in current era before completing HasuraClient initialization (0d43abc)
- Guards on missing current epoch row (6204c96)
- Log all error messages during service startup, not just
HostDoesNotExist
(c81aad8) - Memory leak in Hasura GraphQL client (3c8511d)
- Move current era check to be lazy operation (7830c91)
- Move graphql-engine option under serve command (f76e944)
- policyId comparison expression type (99318cc), closes #485
- Remove promise chaining cycle (8b55ca0), closes #459
- Reorder logging arguments based on Bunyan interface (46b26a0)
- Restore protocol params fetcher init (e86fc1a)
- Scoping on package (82e2040)
- submitTransaction error mapping (3629725)
Known Issues
- Submitting random string to the submitTransaction mutation hangs #545
Sign off
Role | Approval |
---|---|
Technical Lead | ✔️ |
QA Engineer | ✔️ |
Ops | ⏳ |
Release Manager | ✔️ |