Giter VIP home page Giter VIP logo

hasura's Introduction

Hasura

Table of contents

Installation

The following instructions will walk you through the process of setting up and deploying project on your local machine.

Required software

Usage

Start hasura

All hasura data are located at hasura folder, local docker-compose located this or this for Mac-m1.

First you must start hasura and pg by make up (or make up-m1). This command will run hasura in host network mode and postgres, which will be available at localhost:5439.

Once you've done that, update hasura state via:

  • make hasura-update

After that hasura will be available at localhost:8080.

Commands

This section will show main make commands. For a full command list you can use make help.

Command Description
make up Up hasura in docker
make up-m1 Up hasura in docker for mac-m1
make hasura-update Update hasura state (migrations + metadata)
make metadata-export Export local hasura metadata to yamls

Useful links


Создание миграций в Hasura

Создаем файл миграции командой:

make migration-create name=migration_name

Создаются файлы up/down в директории hasura/migrations/default/

Написание миграций

Пишем миграции только руками, не пользуемся встроенными генераторами миграций в hasura console - с ней могут быть проблемы, она не может корректно перекидывать индексы, строить down миграции и прочее.

Мета-данные и права доступа

Не забываем про экспорт мета-данных, которые необходимы для мапинга таблиц в hasura. На нужные таблицы добавляем необходимые права доступа для user/anonymous на insert/select/update/delete. Далее экспортируем мета-данные командой:

make metadata-export

Полученные sql и yaml отгружаем в репозиторий.

hasura's People

Contributors

mathn00b avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.