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

How to save the ids from one form in one page to another intermediate table

I have users table where role is a field in it which can be student, patent, teacher and admin. I have to insert data in student form in one page, it can be done with users whose role is set to student. Now in another page there is a form for…
the_unknown
  • 51
  • 1
  • 1
0
votes
1 answer

How to delete a scheduled event using API?

Disclaimer: I am new to Hasura. I think I am missing some key understanding of how Hasura works. Here is the list of steps I did so far: Initiazed a new Hasura project using Heroku Postgresql database using /v1/query and the following post body, I…
SaidAkh
  • 1,661
  • 4
  • 15
  • 28
0
votes
1 answer

How do I request to graphql with header and auth key in react?

I have this endpoint and I have to get data but the request do not see my key but its required. Endpoint: https://sunny-gorilla-88.hasura.app/v1/graphql x-hasura-admin-secret: X4Hh7kQrymAVxjnw17S6e7n0PChHGbfhV2AgjqnL50aJG5u78zvcgr0no0cSCtbt How can…
0
votes
1 answer

How to render videos with List in react-admin?

I have a question regarding react-admin. So I'm building this admin List which Hasura-graphQL. I am able to render Images with the ImageField component which I am using: And which I have…
theKid
  • 522
  • 6
  • 19
0
votes
1 answer

How to use custom object types in Hasura actions?

I want to create an action with the following input: input PurchaseInput { user: UserInfo! } UserInfo is defined as an object: type UserInfo { accessToken: String! userId: Int! } However Hasura doens't like this and returns a 400 on saving…
f7n
  • 1,476
  • 3
  • 22
  • 42
0
votes
1 answer

Inserting a queried default value in a single GraphQL mutation

I am fairly new to GraphQL, using Hasura connected to a Postgres DB to expose some REST APIs. I'd like to know if there is a way to insert a queried value in a single GraphQL mutation as a default value. mutation insertCode($code: String = "",…
0
votes
1 answer

Hasura unique index not displayed / not found

We're experiencing a weird problem in Hasura. We added a unique key in our postgres DB (via rails) and we can see it's there when we do a query in Hasura SELECT tablename, indexname, indexdef FROM pg_indexes WHERE tablename =…
index
  • 3,697
  • 7
  • 36
  • 55
0
votes
1 answer

How to convert array of object(hasMany relationship data) to array of id?

I wanted to get data and show it in UI. Here's how i write to get the "movies" data. let movies= yield this.store.findAll('movie'); And I log the "movies". As the picture below shows that there's no data for "photos". Here's the network: I'm…
ELsssss
  • 216
  • 2
  • 11
0
votes
1 answer

How to download a GraphQL schema?

I am running an Apollo CLI command to obtain the schema from my Hasura endpoint. apollo schema:download --header 'X-Hasura-Admin-Secret: ' --endpoint https://sample-backend-for-hasura-tutorial.hasura.app/v1/graphql schema.json It fails…
maxweld
  • 229
  • 2
  • 15
0
votes
0 answers

Prevent 'duplicate' rows in a many to many table

In my project I have this feature where users can invite each other to connect. My (postgres) database table structure (in Hasura) looks like this: id // uuid sender_id // uuid - user id receiver_id // uuid - user id status // enum - pending |…
Stuiterbal
  • 457
  • 4
  • 11
0
votes
1 answer

Inserting an array of json to hasura

I am trying to insert an array of objects to my hasura table. I have defined my columns like the image below But I am receiving malformed array literal: \"[]\" error. I am using JSON.stringify from my client side code to stringify my array before…
Natnael
  • 59
  • 12
0
votes
1 answer

Is there a way to get data together with aggregations using graphql subscribtions?

I have a social network kind of web app which includes graphql by react-apollo-client (my graphql server is a Hasura instance). I have notifications feature in my app and I query the notifications details together with count aggregation to show the…
Itamar Smirra
  • 83
  • 1
  • 7
0
votes
1 answer

Why I cannot access the port of my machine from hasura?

I am trying to create the trigger in Hasura, I've created a local API runing o port 5000 that is this const express = require('express') const bodyParser = require('body-parser'); const cors = require('cors') const app = express() app.use(cors({ …
geraktOfRivia
  • 325
  • 3
  • 7
  • 19
0
votes
1 answer

Is there any way that hasura decodes the token and can use its content in a query?

I was wondering if there is any way to do this in hasura without resorting to creating another service. Let me explain, in an api a user sends his token, this is decoded in the backend and and so we know who the user is, this is useful for example…
geraktOfRivia
  • 325
  • 3
  • 7
  • 19
0
votes
0 answers

Hasura installation problem using docker - PostgreSQL not responding

I want to install Hasura using docker. According to the Hasura doc, I created the docker-compose.yml file. then I compose docker with docker-compose up. In my terminal log, a message comes LOG: database system is ready to accept connections. But…
noob_developer
  • 183
  • 3
  • 11