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 insert an object and related array objects in one mutation

I have two tables reels and reel_variations, reels can have many reel_variations and reel_variations belong to one reel. I have read the Hasura docs and haven't been able to figure out how to insert a reel and a couple of reel variations in a single…
J.w
  • 1
0
votes
2 answers

Cannot read property 'affected_rows' of undefined when trying to run an Hasura mutation

I'm using apollo within my vue.js application, I'm currently trying to remove an object by running a mutation, here is the code : this.$apollo.mutate({ mutation: require("../graphql/deleteTag.gql"), variables: { id:…
ryuzak1
  • 234
  • 3
  • 14
0
votes
1 answer

Hasura on Google Cloud Run - Monitoring

I would like to have a monitoring on my Hasura API on Google Cloud Run. Actually I'm using the monitoring of Google Cloud but It is not really perfect. I have the count of 200 code request. But I want for example, the number of each query / mutation…
0
votes
1 answer

Hasura permission denied for table on insert

I'm attempting to do an insert on a table in Hasura's UI. I am getting permission denied even though I'm executing the query inside the api-explorer. "error": { "exec_status": "FatalError", "hint": null, …
Josh Birdwell
  • 745
  • 4
  • 21
0
votes
1 answer

How to export and import data from a Postgres database with Hasura?

I have Hasura GraphQL engine running on a Docker container. My goal is to export all the data from my Postgres database so that my coworker can import it and work with the same data. What is the correct way to do this with Hasura?
davidaap
  • 1,569
  • 1
  • 18
  • 43
0
votes
1 answer

How are multiple instances of Hasura GraphQL Engine and Postgres run locally via Docker?

The docker-compose.yaml to spin up Hasura + Postgres locally, have commands to start a single instance of both. How can multiple instances (say, for multiple projects) be setup locally?
Meera
  • 88
  • 9
0
votes
0 answers

Unable to create an efficient, basic mutation with relationships using Hasura and GraphQL

I am building an API on top of my PostgreSQL database, using Hasura and GraphQL as the middle layer. I run a service business, where customers can subscribe to services such as "weekly cleaning of the coffee machine" or "refilling of the mojito…
tboerstad
  • 51
  • 4
0
votes
1 answer

Are event triggers in Hasura 1.3.0 broken?

I was just testing an event-trigger on my users table, and while the trigger works (it hits the webhook just fine) it fails attempting to log that the trigger works. I get the following error on 1.3.0 (via docker) { "type": "event-trigger", …
Trey Stout
  • 6,231
  • 3
  • 24
  • 27
0
votes
1 answer

Why is apollo-angular Query returning empty array?

I recently installed and setup apollo-angular, and am having trouble getting data from a query. I've referred to other questions that dealt with similar issues, but they weren't helpful. What I'm certain of is: I've successfully tested a query, so…
Michael C
  • 339
  • 4
  • 19
0
votes
1 answer

Hsaura docker-compose file is returning an error - exited with code 0

This is the docker compose file. The only thing I have changed is adding a command so that hasura would wait until the website is up before spinning up the image. version: "3.8" services: graphql-engine: container_name: "prm_graphql_engine" …
Thomas Ng
  • 73
  • 7
0
votes
1 answer

How to convert SQL CONCAT To GRAPHQL query for hasura

I would like to convert the following postgres query to graphql for hasura. How can I do it? Select CONCAT(cast( "vendorId" as text),split_part("customerUserName",'+', 2)) as id,"vendorId","customerUserName" from "VendorCustomertList"
regShank
  • 215
  • 2
  • 12
0
votes
1 answer

How do I define a hasura gql mutation that has an argument type defined in another schema?

Here is my GQL... (note the variable $rrule) mutation CREATE( $title: String!, $description: String!, $duration: interval!, $photo_url: String, $rrule: String!, $venue_id: Int! ) { result:insert_event_templates_one( object: { …
Trey Stout
  • 6,231
  • 3
  • 24
  • 27
0
votes
0 answers

Hasura limit data based on field

I am looking for a way to put a constraint in place preventing access to data based on a site_uuid. All the tables in my database would have a field site_uuid. Then I would ideally like to pass that site_uuid as a request header and essentially…
Jaybeecave
  • 827
  • 2
  • 8
  • 17
0
votes
1 answer

How to define Hasura permissions via script

We deploy a Hasura Docker image as part of our build pipeline. The documentation only shows how to use the web UI to create permissions. Is there a way to setup permissions in an infrastructure-as-code way? I couldn't find any configuration files or…
Michael Böckling
  • 7,341
  • 6
  • 55
  • 76
0
votes
0 answers

How to filter on values assigned to an alias in GraphQL?

I have a working query which looks like this: query orgs($limit: Int = 10) { orgs: research_db_fundingorganization(limit: $limit) { gridreference { id: data(path: "id") name: data(path: "name") country: data(path:…
dnk8n
  • 675
  • 8
  • 21