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

Can i give a role only permissions to update a column by +1?

im using Hasura with Postgres Its possible to allow the users to increment a column in a table only by one and not letting them change the whole number ? For example im afraid that letting the user "update" the "likes" mutation update_likes { …
Cristian David
  • 674
  • 5
  • 11
0
votes
1 answer

How to filter by NULL with ra-data-hasura

I'm trying to make a filter for react admin using ra-data-hasura as the dataProvider. If I simply try and add {foreign_id: {_is_null: true}} I get many errors as it resolves into { foreign_id: _eq: { {_is_null: true} } }. Using {foreign_id: null}…
James
  • 87
  • 1
  • 8
0
votes
1 answer

Do you have problems updating permissions on hasura v 2 alpha 8?

I recently updated my database to v2 and am now running on alpha 8, the thing is I can't seem to update column permissions, when I try to it loads and does nothing. Is there a way to log all these updates to see why it doesn't update? Any feedback…
0
votes
1 answer

Hasura: Allow-list configuration

I'm trying to setup the allow list feature in Hasura, but the docs seem pretty sparse. This is one of the queries: { hasura_auth(args: {cleartext_password: "xxx", email: "email@mail.com"}) { jwt_token } } How would I integrate the dynamic…
Andii
  • 484
  • 1
  • 4
  • 19
0
votes
0 answers

Hasura select items where children contain the current user

Is there a way in Hasura to run something such as a having which filters the results after all the data is returned after the where? query { applications { permissions { user { id first …
Get Off My Lawn
  • 34,175
  • 38
  • 176
  • 338
0
votes
1 answer

How to create a get-graphql-schema enum from Hasura?

I am working on a project which is backed by Hasura. I am having difficulty creating an enum and getting it to auto-generate the values. I've successfully created a migration according to the enum spec, and verified it is loading values into the…
dysbulic
  • 3,005
  • 2
  • 28
  • 48
0
votes
2 answers

Hasura: Secure event triggers with serverless function

Hasura suggested developers to use serverless functions as event triggers. The way how event triggers work is, when an event is emitted, a specific serverless function will be called. However, even though Hasura deals with authentication &…
Kai Sheng Tung
  • 400
  • 1
  • 10
0
votes
1 answer

Recursive CTE ancestry (Employee with multiple Managers)

I am having difficulties trying to output all managers above an employee. The employees table does not have a manager_id column, which makes this a bit complicated. The hierarchy is defined in a references table. Each employee belongs to a…
dimbslmh
  • 1,801
  • 1
  • 12
  • 8
0
votes
1 answer

_eq permission value against ID in different table?

I'm setting up some permissions in hasura, I have an 'assigned' table which maps an assigned item to a user, I require the user to be able to only access items they have been assigned. I figured the best way to do this was with the _exists operator…
meds
  • 21,699
  • 37
  • 163
  • 314
0
votes
1 answer

graphql get query shows this error "variables are not allowed in scalars"

query describeNotesByNameSpaace($id:bigint!) { notes(where: {object_meta: {_contains: {owner_references: [{uid:$id}]}}}) { id } }
Gokul
  • 3
  • 1
0
votes
1 answer

How to create function postgresql join table in Hasura

I want to create a function to calculate the distance and sort between user and geolayer. I do the following: CREATE OR REPLACE FUNCTION search_geolayer_near_user(location text) RETURNS TABLE(id int, layer_name text, gps_to_center_layer numeric,…
Thien Nguyen
  • 11
  • 1
  • 2
0
votes
1 answer

Hasura: How to filter inside arrays

I have a Postgres database with the following schema: "article_id" type: text "recommendations" type: text[] An example row would look like this: "xxxx1", ["xxxx2", "xxxx3", "xxxx5"] Now in Hasura I can filter on recommendations for an article_id…
Andii
  • 484
  • 1
  • 4
  • 19
0
votes
1 answer

x-hasura-user-id not taken in docker instance?

I have set up a local docker instance of my hasura cloud postgress/metadata setup. Query functions work fine but I found an issue where when an insert has a dependency on hasura-user-id I get a null constraint error - this only happens on the docker…
meds
  • 21,699
  • 37
  • 163
  • 314
0
votes
1 answer

Export hasura data from cloud to docker?

I'm trying to copy my hasura config from the cloud to a local docker build. I ran a hasura init through the CLI pointing at the cloud graphql engine (secret, etc). Then ran a hasura metadata export, however that didn't seem to hav ean effect, the…
meds
  • 21,699
  • 37
  • 163
  • 314
0
votes
1 answer

How make related insert and update in one transaction?

Imagine two tables: People { id: uuid home_id: uuid } Homes { id: uuid } Table People is already populated. What I would like to do, is to insert a new Home and update home_id field in the People table at the same time. Is this possible?
Keatz
  • 3
  • 2