Cardano GraphQL 2.0.0 Beta
Pre-release
Pre-release
·
689 commits
to master
since this release
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.0.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
- Metadata and SQL migrations are now performed within the application layer, and make the service immune to schema
being removed shouldcardano-db-sync
restart using the Hasura CLI, which is included in the Dockerfile and NixOS service; however outside of this you must install and placehasura
onPATH
. - 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.
Breaking Changes ⚠️
Removed fields
cardanoDbSync.slotDiffFromNetworkTip
removed in response to a change in strategy for determining
sync status withcardano-db-sync
Block.slotWithinEpoch
removed due to complexity with variation across eras. The Genesis API has information
for calculations based on the context
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
->2017-10-03T21:43:51Z
Block.createdAt
->Block.forgedAt
Block.createdBy
->Block.slotLeader
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