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
0 answers

Is it possible to use any other database other than PostgreSQL as Hasura metadata database?

When I'm trying to user any other database except Postgres as HASURA_GRAPHQL_METADATA_DATABASE_URL, it doesn't seem to work and gives me the following error "{"detail":{"info":{"code":"postgres-error","error":"connection error","internal":"invalid…
0
votes
0 answers

Handle multiple constraint violations on upsert in GraphQL

I am using Hasura GraphQL engine. How can I go about handling multiple constraint violations? Say I have two constraints, [my_first_constraint, my_second_constraint] on_conflict: { constraint: my_first_constraint, update_columns:…
Vishal Jangid
  • 358
  • 1
  • 10
0
votes
1 answer

Rest API for Authentication with nHost

So I know there's several SDK packages for many languages available for nHost, however I need to create my own interface to the system since the language I'll be using isn't typical. I basically just need to know how to interact with authentication…
wizard_draziw
  • 505
  • 1
  • 5
  • 17
0
votes
0 answers

how to upload multiple images in vue js and express hasura postgresql using dropzone library?

I'm a newbie and I have been trying to upload multiple images with Vue js 3 into Hasura and express backend but I can't find any resource or tutor any help would be apreciated.
0
votes
0 answers

Is there a way how to insert two tables at the same time, but the second table is dependent on the return of from the first table

I am new to graphql and I am having this anycodings_mutation issue and don't know how to solve it. for example, I have two tables: book and anycodings_mutation book_author; the book has book_id and name book_author has anycodings_mutation…
0
votes
1 answer

hasura unique keys + bool condition

I'm trying to add some custom logic to one of my tables on Hasura Postgre. id : PK user_id : FK tag_id : FK is_active : bool 1 abc xyz true 2 abc xyz false 3 abc xyz false Allow only one row with same pair of FK's but column…
Marcus Rohden
  • 113
  • 1
  • 10
0
votes
0 answers

How to type this middleware function on aws lambda?

I have this middleware that gets the aws lambda function event: export function hasuraActionHandler( allowedRoles: string[], handler: ( input: Input, hasuraRole: string, hasuraUserId?: string, ipAddress?: string, …
Stathis Ntonas
  • 1,222
  • 2
  • 20
  • 49
0
votes
0 answers

Hasura on Heroku fails to make connection to postgres

I had a working deployment of Hasura on Heroku. It did run for about 2 years. However, recently, when I startup the application, there's a timeout error, resulting in the app just not starting anymore (see logs below). The credentials, urls etc are…
qsys
  • 176
  • 2
  • 8
0
votes
1 answer

'ERROR_MALFORMED_TOKEN' in next.js with Graphql using hasura

This is my code in login api in next.js : Login.js file - import { magicAdmin } from "../../lib/magic"; import jwt from "jsonwebtoken"; export default async function login(req, res) { if (req.method === "POST") { try { const auth =…
front_dev_j
  • 139
  • 1
  • 12
0
votes
1 answer

How to define "unknown", "undefined", or "any" in hasura action

I am creating a hasura action, where output can be an array of object but object can have any key value pair hence I want to keep the output of hasura action as "any" can you please help?
ps_123
  • 1
  • 3
0
votes
1 answer

Creating relationships over two joins with GraphQL in Hasura (i.e. skipping over a nested relationship)

I have a query that resolves what "product" objects a user currently owns. The user has transactions, these transactions are linked to a particular product, and so we resolve the query as below, which reflects the database structure and…
0
votes
1 answer

Is there a way to know which query to Hasura generated a given SQL output?

Assuming you've identified queries to inspect on a relational database that are likely running into the pitfall of sending too many too small queries and want to figure out where they come from to give the team sending them a heads up, is there any…
saolof
  • 1,097
  • 1
  • 15
  • 12
0
votes
1 answer

Running postgresql and hasrua throws an error

I have a problem. I want to run a postgresql with hasura. I want to get inside the postgresql with Pgadmin. Therefore I would like top open the ports. Unfourntaly I got an error, please see below. hasura_101-postgres-1 | 2022-07-14 09:46:31.515 UTC…
Pyyyyt
  • 49
  • 5
0
votes
1 answer

Hasura Graphql endpoing throwing 504 Error

When I tried to execute a query in hasura console, the response returns 504 after 20.20s. How to solve this? Is hasura application to have any environment variables to configure the request timeout?
Sarath Baiju
  • 226
  • 2
  • 9
0
votes
1 answer

in an Hasura query, is it possible to not repeat the where condition when doing an aggregate query

For example the following query: query getAttributeValues($language_code: String, $id_attribute: Int, $search: String) { v4_bo_v_attribute_values( where: { _and: [ …
Stéphane Gerber
  • 1,388
  • 1
  • 17
  • 30