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

Where are Hasura roles stored?

I want to create authentication apis in Hasura. My user can have differrent roles when signing up. Thinking of maintaining an Enum table for the same. So that I can have a foreign key/type from it in the user table. However, I intend to create a…
0
votes
1 answer

How to convert SQL JSONB nested array of uuid to same array with objects

I've a nested array to represent UI from a dynamic report template, but this array (JSONB) contains UUID for each field. I needed to transform this nested array with UUID into a same structure array but with the object for the respective fields. EG:…
0
votes
0 answers

Hasura session variable as parameter in posgtgress function

In hasura you can use column presets to automatically populate table column with value from the jwt token. However I have a scenario where I don't want to directly write the session into the column but instead pass it down as a parameter of a custom…
0
votes
0 answers

Getting not a valid GraphQL query in hasura

With the use of Authorization, the error occurs but not when x-hasura-admin-secret is used. I am trying to insert an individual user. Output: { "errors": [ { "extensions": { "path": "$.selectionSet.insert_users.args.objects", …
SOHAM
  • 395
  • 1
  • 2
  • 8
0
votes
1 answer

Connection refused - Cannot connect Hasura to Postgres in local Kubernetes

I'm trying to run Hasura locally in K8s. I have go 2 deployment files and 2 svc files respectively. # Hasura Deployment apiVersion: apps/v1 kind: Deployment metadata: labels: app: hasura hasuraService: custom name: hasura namespace:…
HelmBurger
  • 1,168
  • 5
  • 15
  • 35
0
votes
0 answers

CI testing on github actions

Good day everyone, i have this issue that i have been struggling with since Friday. i'm trying to write a CI test using github actions, but hasura migrate apply keeps throwing this error - level=fatal msg="database not found: error determining…
0
votes
1 answer

allow unique key column to use null value as key instead of ignoring it

I am new to using graph ql, and I am trying to set up a unique key for one of my tables. For context, the table's key will be determined on the combination of part_number + organization_id. So each organization ID can only have one part_number, but…
Daniel
  • 31
  • 4
0
votes
0 answers

Hasura GraphQL 504 error(Gateway Time-out) while run the query in GraphQL console - API explorer tool

I have a table with 2.3 millions of data in Postgres DB. While I do the search for user email Id using '_ilike' in Hasura GraphQL console - API explorer tool. Its took too long time to load after 30 seconds its thrown 504 error(Gateway Time-out).Its…
0
votes
1 answer

How to set filtered array relationship in Hasura based on a different table

I'm trying to filter results by referencing another table in Hasura. But I can't wrap my head around it. Can it be done with functions or views or it isn't possible? Here are my…
siniradam
  • 2,727
  • 26
  • 37
0
votes
1 answer

How to create updating mutation with hasura for 2 related tables (for Recipe app)

Hello i am making recipe app and at this point i have to create editing functionality by getting update mutation from hasura.But i have issues trying to create this mutation.Because there are two tables related to each other, one of them is recipes…
Evaldas
  • 169
  • 7
0
votes
1 answer

hasura filtering in next.js is always one key to late

I am getting data from hasura though useRecipe_Filter and passing searchFilter state for it as a variable .It looks like everytime i press a key ui updates one key press to late filtered data is passed to results state const SearchBar = (props: any)…
Evaldas
  • 169
  • 7
0
votes
1 answer

How to access a particular Hasura console using admin-secret

I have been assigned a task which requires me to use the graphql_flutter package to develop a news API. I have been provided with an Authorization token as such: "x-hasura-admin-secret":…
Chirag Maurya
  • 73
  • 1
  • 12
0
votes
1 answer

How to use previously acquired data in the GraphQL query?

Let's say we have two entities. users that has uuid, name and age users_books that has user_uuid, book_id and recommended_age. user_uuid was added as foreign key pointing to uuid in Users Using user name I want to get all the books that that user…
Amantel
  • 659
  • 1
  • 8
  • 18
0
votes
1 answer

having problem with graphql and magic api . how to apply mutations and queries on a server to create a schema

I have two GraphQL files: mutations.js and queries.js under a gql folder... This folder contains GraphQL mutations and queries used across the app. gql mutations.js queries.js I set up the GraphQL endpoint, but i keep getting this…
Amine
  • 21
  • 1
  • 2
0
votes
1 answer

Is there any way to insert data in parent and child model in one graphql mutation

I have a model named Project and a CustomProject model that inherits from it. Currently, I have two mutations one to add a project and one to add a custom project class Project(models.Model): url = models.URLField(blank=True) description =…
Sajjad Zaidi
  • 159
  • 1
  • 10