All Projects → input-output-hk → Cardano Graphql

input-output-hk / Cardano Graphql

Licence: apache-2.0
GraphQL API for Cardano

Labels

Projects that are alternatives of or similar to Cardano Graphql

Rust Overlay
Pure and reproducible nix overlay for binary distributed rust toolchains
Stars: ✭ 46 (-30.3%)
Mutual labels:  nix
Nix Hs Hello Windows
Cross compiling Hello World (haskell) to Windows using nix.
Stars: ✭ 55 (-16.67%)
Mutual labels:  nix
Setup.nix
Nixpkgs based build tools for declarative Python packages [[email protected]]
Stars: ✭ 62 (-6.06%)
Mutual labels:  nix
Nix Dotfiles
My personal nix and nixos configuration
Stars: ✭ 48 (-27.27%)
Mutual labels:  nix
Neutron
🌠 Purely functional Apache Pulsar client for Scala built on top of Fs2
Stars: ✭ 53 (-19.7%)
Mutual labels:  nix
Hs Nix Template
A Haskell project template that can be built with nix and developed by ghcid and cabal-install.
Stars: ✭ 57 (-13.64%)
Mutual labels:  nix
Base16 Zathura
base16 colors for zathura
Stars: ✭ 44 (-33.33%)
Mutual labels:  nix
Rien
Predictable Haskell development environments with Cabal and Nix.
Stars: ✭ 65 (-1.52%)
Mutual labels:  nix
Snabblab Nixos
NixOS configuration for the Snabb Lab
Stars: ✭ 53 (-19.7%)
Mutual labels:  nix
Neovim Nightly Overlay
[[email protected]]
Stars: ✭ 60 (-9.09%)
Mutual labels:  nix
Backerei
Automated reward payment & account management for Tezos bakers.
Stars: ✭ 51 (-22.73%)
Mutual labels:  nix
Microgram
ABANDONED
Stars: ✭ 52 (-21.21%)
Mutual labels:  nix
Homelab
Configuration management for Matt Layher's machines. MIT Licensed.
Stars: ✭ 57 (-13.64%)
Mutual labels:  nix
Workshops
Stars: ✭ 47 (-28.79%)
Mutual labels:  nix
Deckdeckgo
The web open source editor for presentations
Stars: ✭ 1,117 (+1592.42%)
Mutual labels:  nix
Nixery
Container registry which transparently builds images using the Nix package manager
Stars: ✭ 1,023 (+1450%)
Mutual labels:  nix
Nix Gitignore
superseded / unmaintained
Stars: ✭ 56 (-15.15%)
Mutual labels:  nix
Elm2nix
Convert Elm project into Nix expressions
Stars: ✭ 65 (-1.52%)
Mutual labels:  nix
Dotfiles
well-tailored NixOS & nix-darwin dotfiles
Stars: ✭ 63 (-4.55%)
Mutual labels:  nix
Nixos Configurations
Stars: ✭ 58 (-12.12%)
Mutual labels:  nix

Cardano GraphQL

CI


Overview

Cross-platform, typed, and queryable API for Cardano. The project contains multiple packages for composing GraphQL services to meet specific application demands, and a docker-compose stack serving the included cardano-graphql-server Dockerfile and the extended hasura Dockerfile. The schema is defined in native .graphql, and used to generate a TypeScript package for client-side static typing.

Apollo Server exposes the NodeJS execution engine over a HTTP endpoint, and includes support for open source metrics via Prometheus, and implementing operation filtering to deny unexpected queries. Should you wish to have more control over the server, or stitch the schema with an existing service, consider importing the executable schema from the @cardano-graphql/api-* packages only.

GraphQL is a query language and execution environment with server and client implementations across many programming languages. The language can be serialized for network transmission, schema implementations hashed for assurance, and is suited for describing most domains.

TypeScript (and JS) has the largest pool of production-ready libraries, developers, and interoperability in the GraphQL and web ecosystem in general. TypeScript definitions for the schema, generated by GraphQL Code Generator, are available on npm.

Getting Started

Check the releases for the latest version.

git clone \
  --single-branch \
  --branch <VERSION> \
  --recurse-submodules \
  https://github.com/input-output-hk/cardano-graphql.git \
  && cd cardano-graphql

Build and Run via Docker Compose

Builds @cardano-graphql/server and starts it along with cardano-node, cardano-db-sync-extended, postgresql, and hasura:

docker-compose up -d --build && docker-compose logs -f

ℹ️ Omit the --build to use a pre-built image from Dockerhub (or locally cached from previous build)

Check Cardano DB sync progress

Use the GraphQL Playground in the browser at http://localhost:3100/graphql:

{ cardanoDbMeta { initialized syncPercentage }}

or via command line:

curl \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"query": "{ cardanoDbMeta { initialized syncPercentage }}"}' \
  http://localhost:3100/graphql

ℹ️ Wait for initialized to be true to ensure the epoch dataset is complete.

Query the full dataset

{ cardano { tip { number slotNo epoch { number } } } }
curl \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"query": "{ cardano { tip { number slotNo epoch { number } } } }"}' http://localhost:3100/graphql

🎉

{ "data": { "cardano": { "tip": { "number": 4391749, "slotNo": 4393973, "epoch": { "number": 203 } } } } }

For more information, have a look at the Wiki 📖.

How to install (Linux / Docker)

Docker

See Using Docker.

From Source

See Building.

Documentation

Link Audience
API Documentation Users of the Cardano GraphQL API
Wiki Anyone interested in the project and our development process
Example Queries - Cardano DB Hasura Users of the Cardano DB Hasura API

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].