Skip to content

Commit

Permalink
Release/1.0.0 rc.13 (#211)
Browse files Browse the repository at this point in the history
* Update CLI docker-compose

* Bump version, update changelog
  • Loading branch information
rhyslbw authored Jul 6, 2020
1 parent b1595e0 commit 0421b4d
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 21 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,25 @@ Changelog
- Allow explicit ordering of `Transaction.outputs` by their natural `index`
- `Cardano` now matches the postgres view, and is an improvement over the previous version which performed two queries.
- CLI tool `cgql` with commands to assist with Docker-based deployments, including init, snapshotting, and db rebuild.
- Establish relationships to easily access transaction and block information from inputs and outputs
- `TransactionInput.transaction`
- `TransactionInput.sourceTransaction` (where it was an output)
- `TransactionOutput.transaction`
- `CardanoDbMeta` via `Query.cardanoDbMeta` exposes information to understand if the dataset is complete including:
`initialized`, `syncPercentage`, and `slotDiffFromNetworkTip`. The `epoch` data is incomplete until `initialized = true`
, which takes around 2 hours for the initial sync as of block number `4388632`. `syncPercentage` or
`slotDiffFromNetworkTip` provides progress.
- The codebase is now modularized to enable new API segments to be added alongside as an extension, composition of services
for more use-cases, ability to import the executable schema and host on a different server. The packages are published,
to npm, or can be built from source:
- @cardano-graphql/server
- @cardano-graphql/api-cardano-db-hasura
- @cardano-graphql/client-ts
- @cardano-graphql/cli
- @cardano-graphql/util-dev
- @cardano-graphql/util



## Breaking changes
- PostgreSQL views are now being managed in this codebase, so either switch to the
Expand All @@ -26,6 +45,11 @@ Changelog
- `Block.merkelRootHash` -> `Block.merkelRoot`
- The aggregated and known very large numbers are now typed as String. Cardano JS has utilities to work with these return values, currently limited to currency conversion.
- `Transaction.fee` previously `String`, now `BigInt`
- Entrypoint for the service previously found in `./dist/index.js` is now `./packages/server/dist/index.js` after building.
- `Cardano.blockHeight` removed in favour of `Cardano.tip.number`, where `tip` = the most recent `Block`. This unlocks
more information such as `slotNo`, and capability to traverse the chain etc.
- Dates are now coerced to RFC 3339 UTC date-time strings


### Chores
- Updates to Hasura 1.2.1
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ services:
hasura:
build:
context: ./packages/api-cardano-db-hasura/hasura
image: inputoutput/cardano-graphql-hasura:v1.0.0-rc.12
image: inputoutput/cardano-graphql-hasura:v1.0.0-rc.13
ports:
- "8090:8080"
depends_on:
Expand Down Expand Up @@ -86,7 +86,7 @@ services:
build:
context: .
target: server
image: inputoutput/cardano-graphql:v1.0.0-rc.12
image: inputoutput/cardano-graphql:v1.0.0-rc.13
environment:
- CACHE_ENABLED=true
- HASURA_URI=http://hasura:8080
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cardano-graphql",
"description": "A TypeScript monorepo. Includes a server package and API modules for flexible implementation",
"version": "1.0.0-rc.12",
"version": "1.0.0-rc.13",
"private": true,
"workspaces": [
"packages/*"
Expand Down
6 changes: 3 additions & 3 deletions packages/api-cardano-db-hasura/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cardano-graphql/api-cardano-db-hasura",
"version": "1.0.0-rc.12",
"version": "1.0.0-rc.13",
"description": "Module for interfacing with the Cardano DB, populated by cardano-db-sync-extended that utilises Hasura for a powerful query interface",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down Expand Up @@ -32,7 +32,7 @@
"schema.graphql"
],
"dependencies": {
"@cardano-graphql/util": "1.0.0-rc.12",
"@cardano-graphql/util": "1.0.0-rc.13",
"@graphql-tools/delegate": "^6.0.10",
"@graphql-tools/schema": "^6.0.9",
"@graphql-tools/wrap": "^6.0.9",
Expand All @@ -48,7 +48,7 @@
"p-retry": "^4.2.0"
},
"devDependencies": {
"@cardano-graphql/util-dev": "1.0.0-rc.12",
"@cardano-graphql/util-dev": "1.0.0-rc.13",
"@graphql-codegen/cli": "^1.15.2",
"@graphql-codegen/typescript": "^1.15.2",
"@graphql-codegen/typescript-graphql-files-modules": "^1.15.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cardano-graphql/cli",
"version": "1.0.0-rc.12",
"version": "1.0.0-rc.13",
"description": "Management tool for managing a Cardano GraphQL deployment",
"main": "./dist/index.js",
"bin": {
Expand All @@ -11,7 +11,7 @@
"access": "public"
},
"scripts": {
"build": "tsc -b ./src && shx cp src/Docker/docker-compose.yml dist/Docker/",
"build": "tsc -b ./src && shx cp ../../docker-compose.yml dist/Docker/",
"cleanup": "shx rm -rf dist node_modules",
"dev": "ts-node-dev --no-notify --respawn --transpileOnly src/index.ts",
"global:add": "yarn build && yarn global add file:$PWD",
Expand Down
40 changes: 34 additions & 6 deletions packages/cli/src/Docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ services:
volumes:
- postgres-data:/var/lib/postgresql/data
restart: on-failure
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
cardano-node:
image: inputoutput/cardano-node:${CARDANO_NODE_VERSION:-1.13.0}
environment:
Expand All @@ -24,9 +29,12 @@ services:
- node-db:/data/db
- node-ipc:/ipc
logging:
driver: none
driver: "json-file"
options:
max-size: "400k"
max-file: "20"
cardano-db-sync-extended:
image: inputoutput/cardano-db-sync:${CARDANO_DB_SYNC_VERSION:-2.0.0}
image: inputoutput/cardano-db-sync:${CARDANO_DB_SYNC_VERSION:-2.1.0}
environment:
- EXTENDED=true
- NETWORK=${NETWORK:-mainnet}
Expand All @@ -42,13 +50,20 @@ services:
volumes:
- node-ipc:/node-ipc
restart: on-failure
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
hasura:
image: inputoutput/cardano-graphql-hasura:v1.0.0-rc.12
build:
context: ./packages/api-cardano-db-hasura/hasura
image: inputoutput/cardano-graphql-hasura:v1.0.0-rc.13
ports:
- "8090:8080"
depends_on:
- "postgres"
restart: always
restart: on-failure
environment:
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
Expand All @@ -62,15 +77,28 @@ services:
- postgres_db
- postgres_password
- postgres_user
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
cardano-graphql:
image: inputoutput/cardano-graphql:v1.0.0-rc.12
build:
context: .
target: server
image: inputoutput/cardano-graphql:v1.0.0-rc.13
environment:
- CACHE_ENABLED=true
- HASURA_URI=http://hasura:8080
expose:
- 3100
ports:
- ${API_PORT:-3100}:3100
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
secrets:
postgres_db:
file: ./config/secrets/postgres_db
Expand All @@ -81,4 +109,4 @@ secrets:
volumes:
node-db:
node-ipc:
postgres-data:
postgres-data:
2 changes: 1 addition & 1 deletion packages/client-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cardano-graphql/client-ts",
"version": "1.0.0-rc.12",
"version": "1.0.0-rc.13",
"description": "A client package for Cardano GraphQL, including the GraphQL schema and TypeScript definitions generated from it",
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cardano-graphql/server",
"version": "1.0.0-rc.12",
"version": "1.0.0-rc.13",
"description": "Serve the Cardano GraphQL API over HTTP",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/input-output-hk/cardano-graphql/blob/master/packages/server/README.md",
"dependencies": {
"@cardano-graphql/api-cardano-db-hasura": "1.0.0-rc.12",
"@cardano-graphql/api-cardano-db-hasura": "1.0.0-rc.13",
"@graphql-tools/merge": "^6.0.10",
"apollo-metrics": "^1.0.1",
"apollo-server-core": "^2.14.3",
Expand All @@ -37,7 +37,7 @@
"ts-custom-error": "^3.1.1"
},
"devDependencies": {
"@cardano-graphql/util-dev": "1.0.0-rc.12",
"@cardano-graphql/util-dev": "1.0.0-rc.13",
"@types/graphql-depth-limit": "^1.1.2",
"@types/node": "^14.0.13",
"typescript": "^3.9.5"
Expand Down
4 changes: 2 additions & 2 deletions packages/util-dev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cardano-graphql/util-dev",
"version": "1.0.0-rc.12",
"version": "1.0.0-rc.13",
"description": "Common development utilities",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand All @@ -21,7 +21,7 @@
},
"homepage": "https://github.com/input-output-hk/cardano-graphql/blob/master/packages/util-dev/README.md",
"devDependencies": {
"@cardano-graphql/util": "1.0.0-rc.12"
"@cardano-graphql/util": "1.0.0-rc.13"
},
"directories": {
"lib": "src",
Expand Down
2 changes: 1 addition & 1 deletion packages/util/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cardano-graphql/util",
"version": "1.0.0-rc.12",
"version": "1.0.0-rc.13",
"description": "Common utilities",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down

0 comments on commit 0421b4d

Please sign in to comment.