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

postgres function for loop

I have an orders table and an order_products_items table. The order_products_items has these fields: order_id product_id quantity price I am trying to create a calculated_field: calculated_total_products_price in the orders table through a before…
0
votes
1 answer

Receiving error message when trying to connect to GraphQL api over websocket using k6

I'm going to perform a subscription test using k6 for the graphql api that uses Hasura. Here's what I've tried: import ws from "k6/ws"; import { check } from "k6"; export const myFunc = (url, access_token, id, query) => { const headers = { …
Irem Kaya
  • 3
  • 1
0
votes
1 answer

ApolloError: variable x is declared as '[String!]!', but used where '_text' is expected

ApolloError: variable 'wallet_addresses' is declared as '[String!]!', but used where '_text' is expected I get that error above. And my query is below. mutation updateUser( $id: Int $email: String $wallet_addresses:…
0
votes
1 answer

Prevent Hasura event trigger from creating new pending events

I'm attempting to update a table in a PostgreSQL database that has ~2.3 million rows. We also have an event trigger associated with this table which is supposed to run a microservice to perform further calculations whenever a row is…
Soham
  • 3
  • 2
0
votes
1 answer

Hasura: How to group same variables in columns and count them?

I am trying to create a query where data from table analytics value per column will be grouped and counted, I have zero knowledge in grouping a value of columns and counting them and doing this on my end is really hard. So I have an example query…
0
votes
1 answer

String value cannot be saved to non-nullable variable

I've been trying to make a "CREATE_COMMENT" mutation work using GraphQL and Hasura for my frontend. However, when I tested the feature out, I kept getting the same error Here is my Comment Component that uses CREATE_COMMENT mutation function…
Jade
  • 40
  • 7
0
votes
1 answer

Hasura: How to query counts of records from multiple related tables

So I have create this query for my GraphiQL in Hasura, This will get all of the users data and it aims to include the total amount/count of the other data from analytics and follow table where user's id is equal to user_id from the analytics and…
0
votes
2 answers

Graphql query to update a table in hasura

I am trying to update a table in hasura. I have written the below query to update a row in users table where id(primary key) is equal to the passed id from the variable. If the id matches then update the field account_id which is nullable and unique…
mused
  • 79
  • 6
0
votes
1 answer

How to integrate Hasura with Firebase Authentication

Does anyone here have experienced Hasura graphql ? I started exploring @postgrest to fulfill my serverless needs, but I end up dumping it since its hard to make its authentication. Just last two day I learned that I can do phone number…
Yakob Ubaidi
  • 1,846
  • 2
  • 20
  • 23
0
votes
2 answers

How to enforce row-level insert and update permissions in Hasura based on an arbitrary user property

Here is a description of my tables event { id organization__id } user { id } organization { id } organization_user { user__id organization__id } How can I restrict a user in order to allow him to insert/update event…
Nicolas Bourdin
  • 323
  • 1
  • 3
  • 7
0
votes
1 answer

Hasura Query: Select all entries, which are between two specific dates and in a specific time range

I need to query data from a table in Hasura. The structure is mostly irrelevant, just know that the table has a timestamptz field, let's just name it "ts". I want to query all entries with following conditions: ts is between a date range ts is…
marcelhfm
  • 1
  • 5
0
votes
0 answers

Is it possible to convert a GraphQL Schema to SQL create table queries?

My Free Heroku DBs that connected with Hausra was deleted, I am trying to recover it. Before that, I am curious whether it is possible to generate SQL Create table queries from an existing GraphQL schema file ... That is, is it possible to create…
RagAnt
  • 1,064
  • 2
  • 17
  • 35
0
votes
2 answers

Problem to export Hasura metadata - FATA[0001] failed to export metadata

Im trying to export the hasura metadata but i'm receiving this error after running the command hasura metadata export : FATA[0001] failed to export metadata: cannot export actions from metadata: error parsing metadata object: actions file:…
0
votes
0 answers

Hasura WebSocket connection to 'wss://XXX.XXX.XXX.XXX/v1/graphql' failed: WebSocket is closed before the connection is established

This error message will appear when the system is connecting, but sometimes it is good and sometimes it is abnormal. I use Angular & apollo-angular to connect. const ws = new WebSocketLink({ uri:'wss://XXX.XXX.XXX.XXX/v1/graphql', …
Bryant
  • 1
  • 1
0
votes
0 answers

How GraphQL returns a custom json

Test table has some field, Test{ baike_url, baike_content } i use this to test GraphQL fragment Baike on Test{ baike_causes } query MyQuery { Test(limit: 10) { ..Baike } } but is error,i want return this data { …
ArvinYL
  • 1
  • 1