GraphQL on Hasura

Starting from version v0.15.31, the data microservice supports querying over GraphQL in addition to the JSON based query language. The API Explorer section of the API console has GraphiQL integrated to let you explore the GraphQL APIs of Hasura.

Quick overview

  1. Getting GraphQL APIs over a table:
  2. Adding another table to GraphQL schema:
    • Create another table just like you did in 1.
    • Another table has been added to the schema :-)
  3. Linking the two tables and getting GraphQL APIs over them:
  4. Access control for your tables:
    • Set permissions over your tables.
    • Once you set permissions, the GraphQL queries and mutations will respect these permissions.

To know about the GraphQL API in detail, check out the reference.

Note

If you already have a Postgres database and wish to have GraphQL APIs over it, we have a quick guide for migrating your database here.