Download tutorial as e-book ⚡️


    After getting this page sorted, you'll be off to the races. This set of one-time setup steps will get you ready to start building your Hasura project.

    Install the Hasura CLI

    We've redesigned the Hasura CLI from the ground up to make it easier to use and more powerful. Follow the install instructions from the docs for your platform. Please note, this is a new CLI and is not the same as the previous version.

    Install the VS Code extension

    We recommend using VS Code and installing the Hasura VS Code extension. It allows you to instantly scaffold out your metadata 🚀

    You can download the extension from the VS Code Marketplace.

    Authenticate your CLI

    To authenticate your CLI to our network, run the following command:

    ddn login

    This will open a browser window where you can log in with your Hasura account. Once you've logged in, you can close the browser window and return to your terminal.

    Our data model

    In this tutorial, we'll be building the data layer for an e-commerce application. We'll use the following data model, which we'll connect to our project in the next section:

    Table nameDescription
    usersStores information about users, including their name and email address.
    categoriesStores information about categories of products, including their name.
    manufacturersStores information about manufacturers of products, including their name.
    productsStores information about products, including their name and price.
    reviewsStores information about reviews of products, including the user who wrote the review and the product that was reviewed.
    ordersStores information about orders, including the user who placed the order and the product that was ordered.
    cartsStores information about carts, including the user who owns the cart.
    cart_itemsStores information about items in a user's cart, including the user who owns the cart and the product that was added to the cart.
    notificationsStores information about notifications, including the user who owns the notification.
    couponsStores information about coupons, including the coupon code and the discount amount.
    Did you find this page helpful?
    Start with GraphQL on Hasura for Free
    • ArrowBuild apps and APIs 10x faster
    • ArrowBuilt-in authorization and caching
    • Arrow8x more performant than hand-rolled APIs
    footer illustration
    Brand logo
    © 2024 Hasura Inc. All rights reserved