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

Empty response on Hasura auth hook using AWS Lambda

I got some troubles configuring an Hasura auth hook using a Lambda. I need such a function as I am storing my JWT token in an HTTP-only cookie, for security reasons. I'm using a serverless function which returns a correct response (either when…
Jonathan Petitcolas
  • 4,254
  • 4
  • 31
  • 42
0
votes
0 answers

what is the correct setup for hasura tables

user role permissions are not working. i am setting x-hasura-role to user but can't query a table where selection permission is allowed without any checks. also it is not possible to query from react apollo which was working before.…
0
votes
2 answers

postgresql list of time slots from 'Monday' | 09:00:00 | 11:00:00

I’m building a booking system where a user will set their availability eg: I’m available Monday’s from 9am to 11am, Tuesdays from 9am to 5pm etc… and need to generate a list of time slots 15mins apart from their availability. I have the following…
adds
  • 69
  • 1
  • 6
0
votes
1 answer

GraphQL error: variable price of type Float is used in position expecting float8

I get an error while sending data from Apollo to Hasura GraphQL: Error: GraphQL error: variable price of type Float is used in position expecting float8 This is my code in nuxt js import gql from 'graphql-tag'; const insert = gql` mutation…
Mark AI
  • 31
  • 6
0
votes
1 answer

How do I use Hasura/postgres uuid with apollo-ios and swift

I have a table defined in Hasura (Postgres) using native uuid as the field datatype. My goal is to create an update mutation from Swift but the uuid type is not mapped implicitly from Postgres through Hasura and Apollo to Swift. The Hasura…
levous
  • 902
  • 7
  • 13
0
votes
0 answers

GraphQL type query: Getting error "Expected Name, found String 'type'"

I am trying to create a object relationship using Hasura GraphQL API. Followed the documentation https://docs.hasura.io/1.0/graphql/manual/api-reference/schema-metadata-api/relationship.html#create-object-relationship. This is what I did. { …
S.K
  • 480
  • 1
  • 4
  • 19
0
votes
1 answer

Cant connect to web socket of Hasura PostGreSQL docker container

We need a realtime database which we can deploy using docker. I found a Hasura/PostGreSQL docker container which looks like we can use it for our purpose: https://docs.hasura.io/1.0/graphql/manual/getting-started/docker-simple.html One thing I…
Tycho Pandelaar
  • 7,367
  • 8
  • 44
  • 70
0
votes
1 answer

Structuring a hasura-graphql insert mutation query for an object with a one-to-many foreign key relationship

I'm having trouble building a hasura graphql query that inserts a row into a table that has multiple foreign key relationships. I have three tables, "Users", "Groups", and "UserGroups". The "UserGroups" table has foreign key relationships on columns…
Michael Fox
  • 491
  • 5
  • 15
0
votes
1 answer

Why is Hasura erring on startup with "following root fields are duplicated" in beta8?

This question is for a Hasura application running against a Postgres database. When running beta6, everything is working. However, after updating to beta8, Hasura does not start. Here is the last log message when starting with beta6: { …
Tim Fulmer
  • 14,970
  • 7
  • 28
  • 34
0
votes
1 answer

Hasura whatsapp clone JWT boilerplate - how does "users" table get populated?

I have built and launched all the components for the whatsapp clone tutorial. My auth server is generating valid JWT (as per jwt.io) using symetric encryption. The JWT is passed by the react-app correctly it seems since I can signup and login. Now I…
Tbaut
  • 306
  • 1
  • 7
0
votes
0 answers

Postgis - Check if a Point is inside Polygon

I am trying to use the ST_Intersection function to intersect a point by city polyogn but I am having no luck (Hasura + Postgresql) create table "public"."cities"( geom geometry(MultiPolygon, 4326) //other colmuns ); then i added a row with…
Hachemi Hamadi
  • 103
  • 2
  • 9
0
votes
1 answer

Hasura cli.migration conainer fails to update typeorm @updatedatecolumn in postgres-11

I have a postgres database with tables setup using typeorm in an express api and all my tables have createdAt and updatedAt columns. when I use my api directly everything works fine and my updatedAt columns get updated appropriately. but when i go…
Joseph Izang
  • 55
  • 1
  • 4
0
votes
1 answer

Mystery definitions for Hasura Graphql query Operators

I'm using a complex derived graphql query in which I want to get all entries between a min and max value. I'm using Hasura's graphql schema for the query. Heroku's Hasura defines a set of operators for the AggregateObject on their docs…
Luke
  • 1,736
  • 2
  • 16
  • 34
0
votes
1 answer

on conflict mutation gives unexpected result

on_conflict returns unknown argument new to hasura, tried looking at multiple how to on_conflict, ran mutation from api explorer and from frontend, tried upsert_users (suggest me to change it to insert) mutation upsert_users { insert_users( …
0
votes
2 answers

How to reshape a GraphQL (via Hasura) query response?

I have a CHAT_MESSAGE_FRAGMENT that returns all the message data from my Hasura graphql api. However, the Gifted Chat react-native component requires the data in a specific structure so I'm attempting to convert it with the query below. I'm able to…
GollyJer
  • 23,857
  • 16
  • 106
  • 174