Skip to content

cardano-foundation/cardano-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b3431ee ยท Apr 30, 2020
Apr 28, 2020
Apr 30, 2020
Mar 20, 2020
Apr 28, 2020
Apr 30, 2020
Apr 16, 2020
Apr 30, 2020
Mar 24, 2020
Apr 30, 2020
Apr 30, 2020
Jul 30, 2019
Aug 8, 2019
Aug 26, 2019
Mar 5, 2020
Sep 2, 2019
Apr 16, 2020
Nov 2, 2019
Apr 30, 2020
Apr 29, 2020
Apr 29, 2020
Apr 28, 2020
Mar 5, 2020
Sep 2, 2019
Feb 6, 2020
Apr 30, 2020
Nov 2, 2019
Apr 30, 2020
Apr 7, 2020
Apr 30, 2020
Apr 28, 2020
Nov 28, 2019
Apr 30, 2020

Repository files navigation

Cardano GraphQL


Overview

Cross-platform, typed, and queryable API service for Cardano, powered by Hasura to precisely query projected Cardano state from PostgreSQL.

The schema is defined in native .graphql, and used to generate packages for internal and client-side static typing. Apollo Server exposes the NodeJS execution engine over a HTTP endpoint.

A CLI aims to streamline the setup and deployment process.

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

  1. Clone the repository.
$ git clone [email protected]:input-output-hk/cardano-graphql.git
$ cd cardano-graphql
  1. Start cardano-node, cardano-db-sync-extended, postgresql and cardano-graphql components using Docker:
$ NETWORK=testnet docker-compose up
  1. Query the API once fully synced ๐ŸŽ‰
$ curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardano { blockHeight }}"}' http://localhost:3100/graphql

For more information, have a look at the Wiki ๐Ÿ“–.

How to install (Linux / Docker)

Docker (recommended)

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