github cardano-foundation/cardano-graphql 2.0.0
Cardano GraphQL 2.0.0

latest releases: 8.0.3, 8.0.2, 8.0.1...
3 years ago

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

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. The docker-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 place hasura on PATH

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 networks
  • Cardano.protocolConst, Cardano.slotDuration, Cardano.startTime, Cardano.slotsPerEpoch removed. Access this information from the Genesis API
  • cardanoDbSync.slotDiffFromNetworkTip removed in response to a change in strategy for determining sync status with cardano-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 to 2017-10-03T21:43:51Z
  • Block.createdBy changed to Block.slotLeader that links to an object, with a nullable stakePool field. For previous behaviour, Block.slotLeader.description can be used, however the description prefixes have changed upstream from SlotLeader to ByronGenesis
  • Block.createdAt changed to Block.forgedAt
  • Block.slotWithinEpoch changed to Block.slotInEpoch

Known issues

  • #164 Field aliasing via delegated schema does not remap field names

Documentation

README provides complete overview and documentation:

Supported Platforms

Sign off

Role Approval
Technical Lead ✔️
QA Engineer ✔️
Ops ✔️
Release Manager ✔️

Don't miss a new cardano-graphql release

NewReleases is sending notifications on new releases.