hero

Hasura ORM

Fragment oriented Hasura ORM for backends with many stuff "from the box"

Get started

npm i hasura-om
const { Hasura } = require('hasura-om')

const orm = new Hasura({
    graphqlUrl: 'your hasura endpoint',
    adminSecret: 'your hasura admin secret'
})
await orm.generateTablesFromAPI()

let [err, result] = await orm.query({
    user: {
        where: { is_live: { _eq: true } },
        limit: 10,
        order_by: { rating: 'desc' }
    },
    pets: {
        select: {
            where: { type: { _eq: 'dog' } }
        },
        aggregate: {
            count: {},
            avg: ['age']
        }
    }
})
This framework is not affiliated with the Hasura team.

MIT Licensed | 2020-present by Spartak