graphql-engine Documentation

Blazing fast, instant realtime GraphQL APIs on all your data with fine grained access control, also trigger webhooks on database events.

RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy graphql-engine on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name graphql-engine -p 65002:65002 --restart always hasura/graphql-engine:latest
Configured Services & Ports
โš™๏ธ postgres
image: build locally
๐Ÿ”Œ Ports: 65002:5432
โš™๏ธ citus
image: build locally
๐Ÿ”Œ Ports: 65004:5432
โš™๏ธ cockroach
image: build locally
๐Ÿ”Œ Ports: 65008:26257
โš™๏ธ sqlserver
image: build locally
๐Ÿ”Œ Ports: 65003:1433
โš™๏ธ dc-reference-agent
image: build locally
โš™๏ธ dc-sqlite-agent
image: build locally
docker-compose.yml
yaml (docker-compose.yml)
# This file extends the base Docker Compose files to make manual testing easy.
#
# Run the following to get started:
#
#     docker compose up -d
#
# That will start up services in the background. To take them down, you have to
# run:
#
#     docker compose down
#
# If you changed DB init scripts, then you should also run:
#
#     docker compose down -v
#
# That'll delete the volumes. Otherwise e.g. PostgreSQL will skip initializing
# if a DB already exists.
#
# If you omit `-d`, it'll run them all in the foreground, then you can stop them
# with your usual Ctrl-C terminal command.
#
# Facts:
#
# * The SERVICE PORTS numbering start at 65001, 65002, etc. to avoid bothering
#   existing instances of databases.
#
# * The login credentials are, where possible, all "hasura" to avoid unnecessary
#   mental overhead.
#
# * The SQL Server image will only work on macOS if you enable the relevant
#   settings. Open the Docker Desktop settings, enable "Use Virtualization
#   framework" in the "General" tab, and "Use Rosetta for x86/amd64 emulation on
#   Apple Silicon" in the "Features in development" tab.

name: hge-manual-tests

services:
  postgres:
    extends:
      file: docker-compose/databases.yaml
      service: postgres
    ports:
      - "65002:5432"
    environment:
      POSTGRES_USER: "hasura"
      POSTGRES_PASSWORD: "hasura"
      POSTGRES_DB: "hasura"
    volumes:
      - postgres-data:/var/lib/postgresql
      - ./docker-compose/postgres/init.sh:/docker-entrypoint-initdb.d/init-hasura.sh:ro

  citus:
    extends:
      file: docker-compose/databases.yaml
      service: citus
    ports:
      - "65004:5432"
    environment:
      POSTGRES_USER: "hasura"
      POSTGRES_PASSWORD: "hasura"
      POSTGRES_DB: "hasura"
    volumes:
      - citus-data:/var/lib/postgresql
      - ./docker-compose/postgres/init.sh:/docker-entrypoint-initdb.d/init-hasura.sh:ro

  cockroach:
    extends:
      file: docker-compose/databases.yaml
      service: cockroach
    ports:
      - "65008:26257"
    environment:
      COCKROACH_USER: "root"
      COCKROACH_DATABASE: "hasura"
    volumes:
      - cockroach-data:/cockroach/cockroach-data

  sqlserver:
    extends:
      file: docker-compose/databases.yaml
      service: sqlserver
    ports:
      - "65003:1433"
    volumes:
      - mssql-data:/var/opt/mssql

  dc-reference-agent:
    extends:
      file: dc-agents/docker-compose.yaml
      service: dc-reference-agent

  dc-sqlite-agent:
    extends:
      file: dc-agents/docker-compose.yaml
      service: dc-sqlite-agent

volumes:
  citus-data:
  cockroach-data:
  mssql-data:
  postgres-data:

File: README.md

Hasura GraphQL Engine

The Hasura engine is an open source project which supercharges the building of modern applications by providing access
to data via a single, composable, secure API endpoint.


Hasura V3

The future of data delivery is GA: Supporting PostgreSQL (and its flavors), MongoDB, ClickHouse, and MS SQL Server. Also supports writing custom business logic using the Typescript, Python, and Go Connector SDKs. Here is the recommended Getting Started guide on DDN.

The Hasura v3 engine code, which powers Hasura DDN, is in the v3 folder of this repo. You can find more detailed
information about this v3 README.

The Hasura DDN architecture includes Data Connectors to connect to data sources. All Hasura connectors are also
available completely open source. Check out the Connector Hub which lists all
available connectors.

Hasura V2


Hasura V2 is the current stable version of the Hasura GraphQL Engine. Please find more
detailed information about the V2 Hasura Graphql Engine in the v2 folder and this README.

Cloning repository

This repository is a large and active mono-repo containing many parts of the Hasura ecosystem and a long git
history, that can make the first time cloning of the repository slow and consume a lot of disk space. We recommend
following if you are facing cloning issues.

Shallow clone

This will only clone the latest commit and ignore all historical commits.

text
git clone https://github.com/hasura/graphql-engine.git --depth 1

Git checkout with only Hasura V3 engine code

text
git clone --no-checkout https://github.com/hasura/graphql-engine.git --depth 1
cd graphql-engine
git sparse-checkout init --cone
git sparse-checkout set v3
git checkout @

This checkouts the top level files and only the v3 folder which contains the Hasura V3 Engine code.

Support & Troubleshooting

To troubleshoot most issues, check out our documentation and community resources. If you have encountered a bug or need
to get in touch with us, you can contact us using one of the following channels:

Code of Conduct

We are committed to fostering an open and welcoming environment in the community. Please see the
Code of Conduct.

Security

If you want to report a security issue, please read this.

Stay up to date

Join our communities to stay up to date on announcements, events, product updates, and technical blogs.
https://hasura.io/community/

Contributing

Check out our contributing guide for more details.

Brand assets

Hasura brand assets (logos, the Hasura mascot, powered by badges etc.) can be found in the
v2/assets/brand folder. Feel free to use them in your application/website etc. We'd be thrilled if you
add the "Powered by Hasura" badge to your applications built using Hasura. โค๏ธ

Licenses

V3

All the Data Connectors are available under
the Apache License 2.0.

The core V3 GraphQL Engine is intended to be licensed under the Apache License 2.0 (Apache-2.0).

V2

The V2 core GraphQL Engine is available under the Apache License 2.0 (Apache-2.0).

All other contents in the v2 folder (except those in server, cli and
console directories) are available under the MIT License.
This includes everything in the docs and community
directories.


File: docs/README.md

Info

The most up-to-date information for the docs site can be found on our wiki. You can access the wiki on the
live docs site, or directly within this repository.