Skip to content

Commit f830e5b

Browse files
authored
Merge pull request #251 from input-output-hk/chore/bump-version
Version 2.0.0-beta.0
2 parents 9bd14b7 + be1ec6a commit f830e5b

File tree

11 files changed

+68
-20
lines changed

11 files changed

+68
-20
lines changed

CHANGELOG.md

+47
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,53 @@
11
Changelog
22
=========
33

4+
## 2.0.0-beta.0
5+
This new major version brings the first round of Shelley-era features to the API,
6+
introduces a new genesis file API package, and hardens the migrations and metadata handling.
7+
This version is required for transitioning through the upcoming Shelley hard fork.
8+
9+
### Compatible with:
10+
11+
- [`cardano-node`: `1.18.0`](https://github.com/input-output-hk/cardano-node/releases/tag/1.18.0)
12+
- [`cardano-db-sync`: `3.0.0`](https://github.com/input-output-hk/cardano-db-sync/releases/tag/3.0.0) - Note: The database must be recreated using the new version.
13+
14+
## Features
15+
### New Queries
16+
- `stakePools`, `stakePools_aggregate`
17+
- `delegations`, `delegations_aggregate`
18+
- `stakeRegistrations`, `stakeRegistrations_aggregate`
19+
- `stakeDeregistrations`, `stakeDeregistrations_aggregate`
20+
- `withdrawals`, `withdrawals_aggregate`
21+
- `genesis`
22+
- Metadata and SQL migrations are now performed within the application layer, and make the service immune to schema
23+
being removed should `cardano-db-sync` restart. using the
24+
[Hasura CLI](https://hasura.io/docs/1.0/graphql/manual/hasura-cli/install-hasura-cli.html), which
25+
is included in the [Dockerfile](./Dockerfile) and [NixOS](./nix/nixos/cardano-graphql-service.nix)
26+
service, however outside of this you must install and place `hasura` on PATH.
27+
- A new API package [`@cardano-graphql/api-genesis`](./packages/api-genesis/README.md) allows
28+
access to the network genesis files. It's integrated into the server, with the config exposed
29+
as environment variables. As usual, the docker-compose.yaml serves as a good reference.
30+
31+
## Breaking Changes :warning:
32+
### Removed fields
33+
- `cardanoDbSync.slotDiffFromNetworkTip` **removed** in reponse to a change in strategy for determining
34+
sync status with `cardano-db-sync` determining sync status relies on a chain
35+
that has produce
36+
- `Block.slotWithinEpoch` **removed** due to complexity with variation across eras. The Genesis API has information
37+
for calculations based on context.
38+
39+
### Changed fields
40+
Dates we're previously formatted to ISO 3339, however ISO 8601 is being adopted with this release for
41+
alignment with the Shelley genesis file format and simplification when the precision is not required.
42+
- `2017-10-03T21:43:51.000Z` -> `2017-10-03T21:43:51Z`
43+
- `Block.createdAt` -> `Block.forgedAt`
44+
- `Block.createdBy` -> `Block.slotLeader` links to an object, with a nullable `stakePool` field. For
45+
previous behaviour, `Block.slotLeader.description` can be used, however the description prefixes have
46+
changed upstream from `SlotLeader` to `ByronGenesis`
47+
48+
## Chores
49+
- Migrations have been squashed into a single step.
50+
451
## 1.0.0
552
## Features
653
- Optimised versions of some key aggregated queries:

docker-compose.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ services:
5959
hasura:
6060
build:
6161
context: ./packages/api-cardano-db-hasura/hasura
62-
image: inputoutput/cardano-graphql-hasura:${CARDANO_GRAPHQL_VERSION:-1.0.0}
62+
image: inputoutput/cardano-graphql-hasura:${CARDANO_GRAPHQL_VERSION:-2.0.0-beta.0}
6363
ports:
64-
- "8090:8080"
64+
- ${HASURA_PORT:-8090}:8080
6565
depends_on:
6666
- "postgres"
6767
restart: on-failure
@@ -87,9 +87,10 @@ services:
8787
build:
8888
context: .
8989
target: server
90-
image: inputoutput/cardano-graphql:${CARDANO_GRAPHQL_VERSION:-1.0.0}
90+
image: inputoutput/cardano-graphql:${CARDANO_GRAPHQL_VERSION:-2.0.0-beta.0}
9191
environment:
9292
- CACHE_ENABLED=true
93+
- GENESIS_FILE_BYRON=/configuration/genesis_byron.json
9394
- GENESIS_FILE_SHELLEY=/configuration/genesis_shelley.json
9495
- HASURA_URI=http://hasura:8080
9596
- POSTGRES_HOST=postgres

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cardano-graphql",
33
"description": "A TypeScript monorepo. Includes a server package and API modules for flexible implementation",
4-
"version": "1.0.0",
4+
"version": "2.0.0-beta.0",
55
"private": true,
66
"workspaces": [
77
"packages/*"
@@ -23,7 +23,7 @@
2323
"service-dependencies": "docker-compose config --services | grep -v \"cardano-graphql\" | xargs docker-compose",
2424
"start:mainnet": "GENESIS_FILE_BYRON=${PWD}/config/network/mainnet/genesis_byron.json GENESIS_FILE_SHELLEY=${PWD}/config/network/mainnet/genesis_shelley.json HASURA_URI=http://localhost:8090 yarn workspace @cardano-graphql/server start",
2525
"start:shelley_testnet": "GENESIS_FILE_SHELLEY=${PWD}/config/network/shelley_testnet/genesis_shelley.json yarn workspace @cardano-graphql/server start",
26-
"start:mainnet_candidate_3": "GENESIS_FILE_BYRON=${PWD}/config/network/mainnet_candidate_3/genesis_byron.json GENESIS_FILE_SHELLEY=${PWD}/config/network/mainnet_candidate_3/genesis_shelley.json yarn workspace @cardano-graphql/server start",
26+
"start:mainnet_candidate_3": "GENESIS_FILE_BYRON=${PWD}/config/network/mainnet_candidate_3/genesis_byron.json GENESIS_FILE_SHELLEY=${PWD}/config/network/mainnet_candidate_3/genesis_shelley.json HASURA_URI=http://localhost:8090 yarn workspace @cardano-graphql/server start",
2727
"test": "yarn workspaces run test"
2828
},
2929
"contributors": [

packages/api-cardano-db-hasura/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cardano-graphql/api-cardano-db-hasura",
3-
"version": "1.0.0",
3+
"version": "2.0.0-beta.0",
44
"description": "Module for interfacing with the Cardano DB, populated by cardano-db-sync-extended that utilises Hasura for a powerful query interface",
55
"main": "dist/index.js",
66
"typings": "dist/index.d.ts",
@@ -32,7 +32,7 @@
3232
"schema.graphql"
3333
],
3434
"dependencies": {
35-
"@cardano-graphql/util": "1.0.0",
35+
"@cardano-graphql/util": "2.0.0-beta.0",
3636
"@graphql-tools/delegate": "^6.0.10",
3737
"@graphql-tools/schema": "^6.0.9",
3838
"@graphql-tools/wrap": "^6.0.9",
@@ -50,7 +50,7 @@
5050
"set-interval-async": "^1.0.33"
5151
},
5252
"devDependencies": {
53-
"@cardano-graphql/util-dev": "1.0.0",
53+
"@cardano-graphql/util-dev": "2.0.0-beta.0",
5454
"@graphql-codegen/cli": "^1.15.2",
5555
"@graphql-codegen/typescript": "^1.15.2",
5656
"@graphql-codegen/typescript-graphql-files-modules": "^1.15.2",

packages/api-genesis/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Cardano GraphQL - API Genesis
22

3-
This API module provides access to the network's genesis file.
3+
This API module provides access to the network's genesis files, keyed by era.

packages/api-genesis/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cardano-graphql/api-genesis",
3-
"version": "1.0.0",
3+
"version": "2.0.0-beta.0",
44
"description": "Query the network genesis",
55
"main": "dist/index.js",
66
"typings": "dist/index.d.ts",
@@ -38,7 +38,7 @@
3838
"graphql-scalars": "^1.2.2"
3939
},
4040
"devDependencies": {
41-
"@cardano-graphql/util-dev": "1.0.0",
41+
"@cardano-graphql/util-dev": "2.0.0-beta.0",
4242
"@graphql-codegen/cli": "^1.15.2",
4343
"@graphql-codegen/typescript": "^1.15.2",
4444
"@graphql-codegen/typescript-graphql-files-modules": "^1.15.2",

packages/cli/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cardano-graphql/cli",
3-
"version": "1.0.0",
3+
"version": "2.0.0-beta.0",
44
"description": "Management tool for managing a Cardano GraphQL deployment",
55
"main": "./dist/index.js",
66
"bin": {

packages/client-ts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cardano-graphql/client-ts",
3-
"version": "1.0.0",
3+
"version": "2.0.0-beta.0",
44
"description": "A client package for Cardano GraphQL, including the GraphQL schema and TypeScript definitions generated from it",
55
"repository": {
66
"type": "git",

packages/server/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cardano-graphql/server",
3-
"version": "1.0.0",
3+
"version": "2.0.0-beta.0",
44
"description": "Serve the Cardano GraphQL API over HTTP",
55
"main": "dist/index.js",
66
"typings": "dist/index.d.ts",
@@ -24,8 +24,8 @@
2424
},
2525
"homepage": "https://github.com/input-output-hk/cardano-graphql/blob/master/packages/server/README.md",
2626
"dependencies": {
27-
"@cardano-graphql/api-cardano-db-hasura": "1.0.0",
28-
"@cardano-graphql/api-genesis": "1.0.0",
27+
"@cardano-graphql/api-cardano-db-hasura": "2.0.0-beta.0",
28+
"@cardano-graphql/api-genesis": "2.0.0-beta.0",
2929
"@graphql-tools/merge": "^6.0.10",
3030
"apollo-metrics": "^1.0.1",
3131
"apollo-server-core": "^2.14.3",
@@ -39,7 +39,7 @@
3939
"ts-custom-error": "^3.1.1"
4040
},
4141
"devDependencies": {
42-
"@cardano-graphql/util-dev": "1.0.0",
42+
"@cardano-graphql/util-dev": "2.0.0-beta.0",
4343
"@types/graphql-depth-limit": "^1.1.2",
4444
"@types/node": "^14.0.13",
4545
"shx": "^0.3.2",

packages/util-dev/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cardano-graphql/util-dev",
3-
"version": "1.0.0",
3+
"version": "2.0.0-beta.0",
44
"description": "Common development utilities",
55
"main": "dist/index.js",
66
"typings": "dist/index.d.ts",
@@ -22,7 +22,7 @@
2222
},
2323
"homepage": "https://github.com/input-output-hk/cardano-graphql/blob/master/packages/util-dev/README.md",
2424
"devDependencies": {
25-
"@cardano-graphql/util": "1.0.0",
25+
"@cardano-graphql/util": "2.0.0-beta.0",
2626
"shx": "^0.3.2"
2727
},
2828
"directories": {

packages/util/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cardano-graphql/util",
3-
"version": "1.0.0",
3+
"version": "2.0.0-beta.0",
44
"description": "Common utilities",
55
"main": "dist/index.js",
66
"typings": "dist/index.d.ts",

0 commit comments

Comments
 (0)