graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

Add support for CockroachDB

Open orefalo opened this issue 8 years ago • 47 comments

Or any distributed/replicated SQL db alike...

orefalo avatar Oct 08 '18 18:10 orefalo

It is really cool!

stanxii avatar Jan 22 '19 09:01 stanxii

would be interesting

karibertils avatar May 16 '19 17:05 karibertils

CockroachDB doesn't support triggers at this moment. Could Hasura implement event triggers without built-in DB support?

Even if that's possible, events won't be fired if you modify the DB directly.

https://github.com/cockroachdb/cockroach/issues/28296

vroad avatar May 21 '19 00:05 vroad

Latest version of CockroachDB now offers support for experiential change feed. https://www.cockroachlabs.com/docs/v19.1/changefeed-for.html

Could this be used instead of SQL triggers? I'm not sure if current Hasura implementation assume that trigger is always available regardless of the database you use, though.

vroad avatar May 22 '19 00:05 vroad

Is the only thing that's broken is webhooks for db change events? Does everything else work with CockroachDB ?

hiralsp avatar Aug 12 '19 22:08 hiralsp

Hi everyone 👋 this is to let you know that we are aware of the community's request for support for CockroachDB. We will take this up in a few weeks 🙂

marionschleifer avatar Sep 05 '19 10:09 marionschleifer

Any update here?

hiralsp avatar Nov 18 '19 21:11 hiralsp

any updates here?

gnanakeethan avatar Dec 24 '19 02:12 gnanakeethan

Hey everyone, so we did an initial investigation and Hasura doesn't start on CockroachDB out-of-the-box because of Cockroach's different implementation of internal schema and lack of few json operators.

Although now we have more insights into what will go into supporting CockroachDB and we will update this issue when we have a technical spec ready.

tirumaraiselvan avatar Dec 27 '19 06:12 tirumaraiselvan

any updates on this

guru2228 avatar Jan 02 '20 13:01 guru2228

please update, thank you!

hiralsp avatar Feb 22 '20 02:02 hiralsp

@tirumaraiselvan sorry for the noise. Do you have a draft technical spec somewhere already? Me and my team are willing to work on this (ofc with guidance, none of us know Haskell).

nvcnvn avatar Mar 12 '20 04:03 nvcnvn

Plus one for support for CockroachDB! 😄

madasebrof avatar Mar 24 '20 15:03 madasebrof

Any updates?

nmabhinandan avatar May 10 '20 16:05 nmabhinandan

Or any distributed/replicated SQL db alike...

@orefalo Hasura does support YugabyteDB, which is a distributed SQL database with a Postgres-compliant API.

Here is a tutorial on using Hasura and YugabyteDB together.

Yugabyte has a hosted cloud offering that starts with 5GB of storage and 3 nodes on the free tier.

fritzblue avatar Jun 30 '20 14:06 fritzblue

Hi everyone 👋 this is to let you know that we are aware of the community's request for support for CockroachDB. We will take this up in a few weeks 🙂

any updates on this? Thank's!

ChristianHohlfeld avatar Jul 17 '20 08:07 ChristianHohlfeld

I use CockroachDB at work and YugaByte for a personal project. Both are great until now, but also different. With YB you get better compatibility to Postgres and with CRDB you get a very easy management, scaling and stability (more mature than YB, bug not mature as PG).

In general, I prefer tools which I can use in both projects and it would be nice if hasura supports CRDB too. So, the question is, what prohibits usage of CRDB? It's the syntax or missing features like triggers?

As a workaround I can imagine to use custom resolvers to fetch/update CRDB for example with knex or some ORM. Is this the way to go until CRDB is supported?

CockroachDB doesn't support triggers at this moment. Could Hasura implement event triggers without built-in DB support?

Even if that's possible, events won't be fired if you modify the DB directly.

I'm not hasura user yet, but I would like to ask which events are important here? Can it work for migrations?

Bessonov avatar Aug 10 '20 23:08 Bessonov

Would Hasura support any PostgreSQL compatible databases like TiDB or PolarDB?

tonyabracadabra avatar Oct 15 '20 02:10 tonyabracadabra

Vote for CockroachDB! Thank you!

alexandrim0 avatar Nov 28 '20 03:11 alexandrim0

FWIW, as someone mentioned here, https://github.com/yugabyte/yugabyte-db already supports Hasura. It is a competitor to the CockroachDB.

  1. https://docs.yugabyte.com/latest/comparisons/
  2. https://docs.yugabyte.com/latest/comparisons/cockroachdb/
  3. https://docs.yugabyte.com/latest/develop/graphql/hasura/
  4. #411

rrjanbiah avatar Jan 05 '21 13:01 rrjanbiah