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

Mutaion in grapgql by Axios React

I was trying to mutation in graphQL by using Hasura's API console. I checked in Hasura it's properly worked there. But when I was trying to add in react code it gives an error. Code: Axios.post("http://domain.herokuapp.com/v1/graphql", { …
Kazi Rafi
  • 17
  • 2
0
votes
1 answer

Is there a way to write a middleware to all hasura queries and mutations?

I want to add a custom logging system to my app where I can log all the actions performed by a user and record them in a separate table. For this, I need to write a middleware to all existing and future hasura queries and mutations. Will this be…
THpubs
  • 7,804
  • 16
  • 68
  • 143
0
votes
1 answer

Custom row select permission in Hasura based on value in different table

I want to add a row permission to a table based on data in another table. Example: tableA keyA | approved ---------------- key1 | false key2 | true tableB keyB | value ---------------- key1 | querying this row is not allowed key2 | this row…
rze
  • 1
0
votes
1 answer

Creating new roles Using Hasura meatadat API

I am new to Hasura metadata API, Are there any REST API options to create roles via REST API. I am not asking about inherited roles. inherited roles don't meet my requirements.
0
votes
1 answer

GraphQL (A = a AND B = b) OR (A = b AND B = a)

I am new to GraphQL and I've been trying to come up with a simple query but I'm not getting the results I need. Basically, I am writing a mutation to delete a row when the following conditions are met: (A = a AND B = b) OR (A = b AND B = a) However,…
Jack
  • 1
  • 1
0
votes
1 answer

Convert [String] array to [uuid] array in Json REST api for hasura Graph Query

I am trying to send JSON data for graph ql query JSON DATA: { "dataIds": ["1224rr67-4b3e-473c-80a7-dccc480fb6c0", "28avxrb8-5ff6-45ef-b51b-d4f654321bf8"] } GRAPH QL query: query GetDataByIds($dataIds: [uuid!]) { view_data(where: {data_id:…
Fast Coderz
  • 321
  • 1
  • 13
0
votes
1 answer

Why isn't Hasura generating queries for tables in version 2?

I see "table_name_connection" query instead of "table_name" in "query_root" section. The same hash appears instead of numeric IDs. Everything works in the first version, but this version is already deprecated. Has anyone solved this problem? MacOS,…
Vitali
  • 93
  • 7
0
votes
1 answer

How to make Hasura connect to a specific postgresql schema

By default when i connect Hasura to a postgres database, it connects to the public schema. Isn't there an option to connect to a different schema?
thanikkal
  • 3,326
  • 3
  • 27
  • 45
0
votes
1 answer

Is there a template for migrating Hasura migrations & metadata with gitlab ci

I would like to migrate my Hasura managed database schemas and metadata with gitlab's CI, but there doesn't appear to be a specific example of a .gitlab-ci.yml out there.
Jason M.
  • 305
  • 2
  • 6
0
votes
1 answer

Can I make sense of postgres master-slave architecture with hasura?

Maybe a stupid question but I usually install two instances of my postgres database in a master - slave architecture (like this, if you need more details). When configuring hasura, though, I see only one environment variable carrying the url to the…
Laurent Michel
  • 1,069
  • 3
  • 14
  • 29
0
votes
0 answers

PostgreSQL INSERT INTO syntax error when creating function

I'm getting a syntax error but having issues identifying what exactly the issue is. I'm not sure if I'm misunderstanding things here -- but it looks like the INSERT INTO is breaking, but only when it's in the function. I'm running the below through…
doh
  • 21
  • 5
0
votes
1 answer

Hasura - query has no destination for result data

In Hasura, I'm trying write a plpgsql based function which should return the t_documents. The function should accept various optional arguments, based on the argument values it should run appropriate SQL (using IF conditional checks) and return the…
sarak
  • 11
0
votes
0 answers

How to extend business logic in Hasura

I am new to Hasura, and I have questions about how to implement own business logic by utilising the hasura framework. I am starting a e-commerce project and plan to use graphql. I want to minimise the code by applying some tools, and hasura is my…
Ron
  • 6,037
  • 4
  • 33
  • 52
0
votes
1 answer

How to trigger python script with Hasura event

I'm currently building a selfhosted Vuejs webapp (with account logins). The webapp needs to be a Python webscraper GUI where my user has control over the Python scraper. So for example, the user fills in an endpoint, starts scraper, view results,…
user3411864
  • 624
  • 2
  • 12
  • 27
0
votes
1 answer

typescript relay reactjs IRTransformer: Unknown kind `undefined`. using hasura

Hi i got this error which i got before, but i forgot how i solved it. I created a new query for Relay but I get this error. I remember it has to do something with Typescript, but not sure what i did wrong. ERROR: IRTransformer: Unknown kind…
Wiezalditzijn
  • 443
  • 3
  • 17