Questions tagged [hasura]

Hasura is an open-source tool that provides instant realtime GraphQL APIs and webhook event triggers on Postgres.

Hasura

Hasura provides a scalable and performant GraphQL API out of the box. It can run up to 1mio concurrent subscriptions, scaling vertically & horizontally seamlessly. It comes with a comprehensive permission system that allows you to enforce fine-grained access control. Authentication can be integrated using webhooks or JWT. Hasura also allows you to extend your GraphQL API with business logic through remote schemas (other GraphQL servers), actions (REST APIs) or even custom functions in Postgres. Event triggers make it possible to trigger business logic that is running in serverless functions.

Hasura runs in a Docker container and can be deployed to any cloud provider that runs Docker, or it can be run locally. Use Hasura migrations to migrate from your development environment to production, as well as for version control.

Tech stack

  • The Hasura server which serves the GraphQL API is written in #Haskell. It takes declarative configuration.
  • The Hasura console allows you to configure the Hasura server, manage your Postgres database and test your APIs. It's built with #React.
  • The Hasura CLI that is used for the CI/CD and migration workflows is written in #Go.

Useful links

Initial release

3rd July 2018.

729 questions
4
votes
0 answers

Is it possible customize Hasura mutation/query Error messages?

mutation insert { insert_ArticleType(objects: {id: 10, name: "test", spaceId: 10, creationDate: ""}) { affected_rows } } When I run this query with x-hasura-role equals "reader-space"(here the "reader-space" role not configured with insert…
Sarath Baiju
  • 226
  • 2
  • 9
4
votes
1 answer

Improve Hasura Subscription Performance

we developed a web app that relies on real-time interaction between our users. We use Angular for the frontend and Hasura with GraphQL on Postgres as our backend. What we noticed is that when more than 300 users are active at the same time we…
Flowmerca
  • 165
  • 1
  • 5
4
votes
1 answer

Dynamic Hasura X-Hasura-Role with Apollo SubscriptionClient

What is the proper way to dynamically change the headers in Apollo SubscriptionClient based on the users role in Hasura? Stack: NextJS Apollo Auth0 Hasura (Stores Auth0_Id with Role column) The goal here is to utilize Hasura roles for permissions.…
GerritVK
  • 325
  • 2
  • 11
4
votes
2 answers

How to access public api in hasura

I'm running a docker container with admin secret. In the below image, you can see the roles under the permissions window. For category table, I set public role for SELECT option and there is no restriction for that role to access any query. But my…
Akash D
  • 780
  • 2
  • 11
  • 27
4
votes
0 answers

Dynamically set X-Hasura-role in the claim with Firebase

I'm using Hasura as my backend and Google's Firebase for auth in a React app. I have the following roles and constructs: Manager - these are my paying customers. They can own 1 or more Team. Employee - these are just normal users. They must be…
7ball
  • 2,183
  • 4
  • 26
  • 61
4
votes
1 answer

Hasura computed fields vs. Postgres generated columns vs. Postgres views

We're implementing an e-commerce data model and struggle to decide between Postgres generated columns, Hasura computed fields, and Postgres views. As a simplification, we have two…
Philip Seyfi
  • 929
  • 1
  • 10
  • 24
4
votes
2 answers

Does Hasura (GraphQL) supports multiple databases?

I am implementing a GraphQL server (Hasura), the normal setup looks like this: docker run -d --net=host \ -e HASURA_GRAPHQL_DATABASE_URL=postgres://username:password@hostname:port/dbname \ -e HASURA_GRAPHQL_ENABLE_CONSOLE=true…
Ander
  • 5,093
  • 7
  • 41
  • 70
4
votes
1 answer

Hasura graphql query between dates

In my hasura.io database, I have a booking table, where I store bookings with the following properties: id (autoincrement) from (timestamptz) to (timestamptz) description (text) Now, from the UI, when a user makes a booking, I would like to check…
Alejandro Garcia Anglada
  • 2,373
  • 1
  • 25
  • 41
4
votes
0 answers

Starting Hasura GraphQL engine Docker image

I'm trying to get started with Hasura GraphQL engine running locally on OSX in Docker and connecting to an existing database but I am having trouble finding the container or the Hasura console. Here's what I have: docker -v Docker version 19.03.5,…
burntsugar
  • 57,360
  • 21
  • 58
  • 81
4
votes
1 answer

How to configure endpoint and custom graphql query in React-Admin

I'm setting up a react-admin app, that needs to connect with a Hasura Service using a graphql provider. To do so, I need to pass for the provider the endpoint "/v1/graphql" and the query with the selects subfields. Like this: query MyQuery { …
7xRobin
  • 341
  • 1
  • 4
  • 11
4
votes
1 answer

What is the best and proper way to user Hasura as a Data Access Layer

I want to use Hasura only as a Data Access Layer behind a NestJs GraphQL server and keep all the benefit of Hasura especially the real time feature with subscriptions. The idea is to build a more customised API and handle all the business logic…
a__t
  • 41
  • 1
  • 1
4
votes
1 answer

How to deal with complex permissions in Hasura

Basics - I need to return data from columns based on some variables from a different table(I either return column or null if access is not allowed) I have already done what I need via a custom function in postgres, but the problem is that in Hasura…
Davinel
  • 940
  • 4
  • 10
  • 20
4
votes
1 answer

Hasura webhook auth with Amazon Cognito

My question is more in line of designing the webhook architecture with Amazon Cognito. I came up with following design after going through hasura's documentation on webhook auth. Is it feasible? Note: AWS lambda is behind API gateway with…
dina
  • 937
  • 1
  • 12
  • 29
4
votes
2 answers

How to export data as a CSV file from a Hasura database?

I have a few tables in the database in a Hasura cluster. I want to export one them as a CSV file (with the data). How can I do this?
sandip
  • 105
  • 1
  • 9
4
votes
2 answers

How to create cron jobs on Hasura?

How can I create, deploy and run and manage Cron jobs on Hasura?
ecthiender
  • 492
  • 3
  • 16
1 2
3
48 49