Cardano GraphQL 2.0.0
This new major version brings the first round of Shelley era features to the API, introduces a new genesis file API package, and hardens the migrations and metadata handling. This version is required for transitioning through the upcoming Shelley hard fork.
Compatible with
- cardano-node 1.18.0
- cardano-db-sync 3.1.0 (note, the database must be recreated using the new version)
New Features
- New queries
stakePools
,stakePools_aggregate
delegations
,delegations_aggregate
stakeRegistrations
,stakeRegistrations_aggregate
stakeDeregistrations
,stakeDeregistrations_aggregate
withdrawals
,withdrawals_aggregate
genesis
- A new API package
@cardano-graphql/api-genesis
allows access to the network genesis files. It's integrated into the server, with the config exposed as environment variables. Thedocker-compose.yaml
serves as a good reference - Metadata and SQL migrations are now performed within the application layer, and make the service immune to schema mutation during
cardano-db-sync
restart. The Hasura CLI is included in the Dockerfile and NixOS service; however outside of this you must install and placehasura
onPATH
Breaking Changes ⚠️
- The
docker-compose
file now mounts configuration managed in the repository, restoring the usual separation of concerns with service configuration. The Docker images still have the configuration included at build time, however, in practice, being ready to manage your own configuration if required is a good strategy. Simply copying the top level config and committing to source control gives you full control over the services using their native interface
Removed fields
Cardano.networkName
removed. Use network magic from the Genesis API to identify networksCardano.protocolConst
,Cardano.slotDuration
,Cardano.startTime
,Cardano.slotsPerEpoch
removed. Access this information from the Genesis APIcardanoDbSync.slotDiffFromNetworkTip
removed in response to a change in strategy for determining sync status withcardano-db-sync
Changed fields
- Dates were previously formatted according to ISO 3339, however, ISO 8601 is being adopted with this release for alignment with the Shelley genesis file format and simplification when the precision is not required, e.g.
2017-10-03T21:43:51.000Z
changed to2017-10-03T21:43:51Z
Block.createdBy
changed toBlock.slotLeader
that links to an object, with a nullablestakePool
field. For previous behaviour,Block.slotLeader.description
can be used, however the description prefixes have changed upstream fromSlotLeader
toByronGenesis
Block.createdAt
changed toBlock.forgedAt
Block.slotWithinEpoch
changed toBlock.slotInEpoch
Known issues
- #164 Field aliasing via delegated schema does not remap field names
Documentation
README provides complete overview and documentation:
Supported Platforms
- Linux 64-bit
- Docker
Sign off
Role | Approval |
---|---|
Technical Lead | ✔️ |
QA Engineer | ✔️ |
Ops | ✔️ |
Release Manager | ✔️ |