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
0
votes
1 answer

Hasura Event trigger include foreign key data sent to webhook

I have a case management system that uses Hasura and would like to add the case number to the users record in a separate crm via a Zapier webhook. I have two tables, Cases and Users. The cases table has a foreign key (userID) to the users table. …
sreeli
  • 47
  • 7
0
votes
1 answer

What is the best way to version control the db schema & metadata in Hasura Cloud?

We've ran into an issue where we have the db backed up, but migrations got out of sorts and as a result there are a lot of GraphQL queries in our frontend code that don't match up to the db relationships at all. I'm new to the project, but it looks…
corysimmons
  • 7,296
  • 4
  • 57
  • 65
0
votes
0 answers

How to add role globally in Hasura?

Does anyone know how to add a new role globally in Hasura? e.g. an editor role Someone had set this up on a project I worked on in the past, and I'm curious how to do it. I need it so any time I add a new table, for the editor role to be…
Nelu
  • 16,644
  • 10
  • 80
  • 88
0
votes
1 answer

Apollo Client: Mutation optional parameter without changing db entries of none set variables to null

I'm using Apollo Client with (hasura as backend if that matters) and have the following mutation: mutation SetArbitrarySubset( $id: String! $foo: String $bar: String ) { update_table( where: { id: { _eq: $id } } _set:…
0
votes
1 answer

How to pass enum value in hasura query in flutter

So I am trying to query data from hasura but one of the variable that I am passing is a variable due to which it always gives some error I tried many different solutions like this but no solution so far this is the query query MyQuery…
Neelay Srivastava
  • 1,041
  • 3
  • 15
  • 46
0
votes
1 answer

set session variable for Hasura on Query in apollo client, currently getting error "missing session variable: "x-hasura-a"

I'm currently writing a next.js app. I have got a query in apollo graphql, that I want to attach a variable to, in the header of the request. The variable is called x-hasura-a . Trying to use it like: const variable ='Test' const get_query =…
John Mayer
  • 1,039
  • 1
  • 11
  • 17
0
votes
1 answer

How to map correctly to make `x-hasura-allowed-roles` field an array using claims_map in Hasura?

I have a JWT token which looks like { "aud": "xx", "iss": "http://xx.com/adfs/services/trust", "iat": 1649956864, "exp": 1649960464, "apptype": "xx", "appid": "dcf6c0d8-7f3c-4904-a0c9-852c92c7624f", "authmethod": "http://xx", …
Hongbo Miao
  • 45,290
  • 60
  • 174
  • 267
0
votes
1 answer

'start received before the connection is initialised'

I'm working with subsciptions in my hasura vue app, but I have console msg: 'start received before the connection is initialised' When I try to get the object result of my subscription, I test my connection and hasura dashboard look connected…
Pablo Fernandez
  • 143
  • 3
  • 9
0
votes
1 answer

Running different Hasura apps with one Postgres

I have two different applications Build with Hasura as the backend and I would like both of them to use the same Postgres instance. Would I encounter any difficulties making this happen? Is it even possible? And what do I need to take into account…
Samuel E.
  • 2,320
  • 2
  • 26
  • 31
0
votes
1 answer

Hasua GraphQL docker engine hammering jwk endpoint

I'm using firebase for the jwk, my docker-compose looks like this: version: '3.6' services: postgres: image: postgres:12 restart: always volumes: - db_data:/var/lib/postgresql/data environment: POSTGRES_PASSWORD:…
meds
  • 21,699
  • 37
  • 163
  • 314
0
votes
3 answers

Switching Enum Values in SQL

i created an enun in sql CREATE TYPE asset_type AS ENUM ( 'bat', 'ball' ); I want switch the value bat to ball 'ball' 'bat' how can we switch enum values in sql
0
votes
1 answer

How to store tempory data in hasura/postgresql database?

How do I store temporary data in hasura/my postgresql database? My usecase is for verificaion codes during onboarding (for example, email) which I don't want to have afterwards in the schema. (otherwise I'd have verification_x, verification_y, etc…
Sasial
  • 3
  • 1
  • 2
0
votes
2 answers

How to setup Hasura migrations between DEV and PROD without loosing data

I'm using hasura migration guide to sync two servers - DEV and PROD. Before we manually transferred the changes (as in 'using UI to copy all the changes'), so now databases are 90% similar. We decided to set up proper migrations, but based on my…
Amantel
  • 659
  • 1
  • 8
  • 18
0
votes
1 answer

Getting internal exception while executing pg_dump when trying to get the init migrations from hasura

I want to get the latest migrations from my hasura endpoint to my local filesystem. Command I'm trying to run hasura init config --endpoint someendpoint.cloudfront.net/ --admin-secret mysecret Output INFO Metadata exported …
0
votes
1 answer

Error when encoding and decoding jwt on next-auth

On next-auth when just using the callbacks object https://next-auth.js.org/configuration/callbacks everything works fine, I can log in with google. and a jwt gets correctly generated. callbacks: { async jwt({ token }) { …