Cardano GraphQL
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.
- Clone the repository.
$ git clone [email protected]:input-output-hk/cardano-graphql.git
$ cd cardano-graphql
- Start
cardano-node
,cardano-db-sync-extended
,postgresql
andcardano-graphql
components using Docker:
$ NETWORK=testnet docker-compose up
- 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 ๐.
See Using Docker.
See Building.
Link | Audience |
---|---|
API Documentation | Users of the Cardano GraphQL API |
Wiki | Anyone interested in the project and our development process |