Live data from Hacker News

Hasura GraphQL Engine and SQL Server

github.com

81–85 of 85 posts

Re: Hasura GraphQL Engine and SQL Server

#81
post #29
post #24

Earlier quoted context omitted.

Can you elaborate on what they are doing?

I can take a guess. PostgreSQL's JSON tooling makes it much easier to build SQL queries that return different shaped data from different tables in a single query. The row_to_json() function for example turns an entire PostgreSQL row into a JSON object. Here's a query I built that uses that to return results from two different tables, via some CTEs and a UNION ALL: https://simonwillison.net/dashboard/row-to-json/ with…

I rewrote a really slow geojson query using this technique recently, it’s very powerful and performant but would say that it trades off some readability.

Re: Hasura GraphQL Engine and SQL Server

#82
post #78

Earlier quoted context omitted.

> Can't speak for all dbs, but many use a clustered index on the primary key. AFAIK, only MySQL (with InnoDB engine) and SQL Server, AFAIK, do it by default (always for MySQL/InnoDB, and by default unless you create a different clustered index before adding the PK constraint for SQL Server, but even then you can specify a nonclustered PK index.) PG doesn't have clustered indexes at all, DB2 has a thing called cluster…

PG does offer clustering: https://www.postgresql.org/docs/11/sql-cluster.html

That's not the same as a clustered index, it just does a one-time rearrangement of the table’s current contents; you have to run it after each change effecting the index to simulate a clustered index (with stable PKs, and the PK index, that would be after each insert, I think.)

You get closer to a clustered index (at the cost of more storage, but the benefit that you can have more than one on a table) with an index using INCLUDE to add all non-key columns in the index.

Re: Hasura GraphQL Engine and SQL Server

#83

Earlier quoted context omitted.

I know this may not be exactly on topic, but do you know when version 2 will be released? My team has been waiting on a single feature from that release for what seems like months (slack in jwt verification time, right now the clocks on our hasura and keycloak servers are off and it is creating issues).

How are you liking keycloak? Was evaluating it against cognito and auth0 last week.

I don't use it directly, our systems engineers maintain and configure it. They had some trouble getting clustering to work for a while, but not sure if that was really the fault of keycloak.

Re: Hasura GraphQL Engine and SQL Server

#85
post #69

How does this compare to Prisma?

Check out this page in the Prisma docs:

https://www.prisma.io/docs/concepts/overview/should-you-use-...

Hasura is great if you want to get a CRUD GraphQL API. Prisma on the other hand in an ORM that you import into your application code giving you more flexibility into the potential use-cases for it.

Post reply on HN