Log in to the Hasura Console

Let's familiarize us with the Hasura Console

The Hasura Console is where you will manage much of your data and your API. Go the the Hasura Tab in the left menu in the Nhost console to get your URL and Admin secret to your Hasura Console.

Hasura details

Once you have logged in, you will see GraphiQL where you can test your GraphQL API. For now, we will skip that and go to the DATA tab in the top menu. Here we can see that your database and Hasura instance is preconfigured with authentication tables for your backend. The tables roles, user_roles and users are present.

If we click on the users table we can see it's empty. You don't have any users yet.

Users table is empty

But let's change that. Let's add a user. We do this in our Nhost console under the Authentication tab. This is normally where you will manage your users. Let's add a new user.

Add a new user

Now the user is added and we can see and manage that user in the Nhost console.

User added

We can also see the new user in the Hasura Console in the database.

User is added in the database

Next, we will create a new table for our app. In the top menu, click on DATA and click the Create Table button to make your first table.

You can have as many tables as you like in your database!

Enter a Table Name and insert your Columns by specifying the name, type, default values, and null/unique constraints. Add the table by pressing Add table.

Add new table

Use the Frequently used columns button to add frequently used columns like id, created_at and updated_at.

There are many types you can select for your table columns. See the full list of Supported PostgreSQL datatypes. For example, the column done in the example above is a Boolean value, which means it can only be true or false.

Hasura automatically creates query functions based on the data types. For example sum is available for numeric data types (Int, numeric, etc), and string searching functions for the Text type.

‚Äč