pg_graphql
safeql
pg_graphql | safeql | |
---|---|---|
8 | 4 | |
2,769 | 15 | |
1.3% | - | |
9.4 | 0.0 | |
5 days ago | 11 months ago | |
Rust | Java | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pg_graphql
-
Is it just me or is the Supabase GraphQL API really bad?
Hi, I'm the author of Supabase GraphQL (pg_graphql)
- Sketch of a Post-ORM
- AWS Amplify Is a Grift
-
Type Constraints in 65 lines of SQL
One of the restrictions of composite types is that they can not contain an instance of themselves. So unfortunately, this is not currently possible.
I had this issue when trying to implement an AST type for pg_graphql[1] back when it was written in SQL [2]. In the end we used a JSON type which was much less constrained. That might be solvable using pg_jsonschema [3] if you really wanted to have a good time though
[1] https://github.com/supabase/pg_graphql
-
Supabase or Hasura?
It’s something that’ll come in future, but nothing available yet: https://github.com/supabase/pg_graphql/issues/17
-
Best Orm that uses Graphql and Postgres
But... If you're looking for Graphql/Postgres, maybe look at https://github.com/supabase/pg_graphql which popped onto my radar yesterday, but I have no experience with it.
-
GraphJin – An Instant GraphQL to SQL Compiler
Check out some of the generated queries this extension [1] pumps out and you might have an answer.
[1] https://github.com/supabase/pg_graphql
-
GraphQL is now available on Supabase
hey HN, supabase ceo here. I'm really excited about this release.
Our GraphQL implementation is built on top of pg_graphql[0], a PostgreSQL extension we open-sourced a few months ago. The implementation works with a lot of native PG functionality (like Row Level Security). You can also do a some neat things with PG GRANTS, enabling/disabling access to different tables/columns to effectively serve a different GraphQL API depending who is "logged in".
On Supabase, the extension is served via PostgREST[1] using the public PostgreSQL function exposed by pg_graphql. PostgREST exposes PG functions as RPC routes (in our case we also map /rest/v1/rpc/graphql => /graphql/v1)
I'll ping the main dev (@oli_rice) and make sure he is here to answer any technical questions. This is just one of the exciting features we're launching this week. Stay tuned for one of our most-requested features later this week.
[0] pg_graphql: https://github.com/supabase/pg_graphql
[1] PostgREST: https://postgrest.org/
safeql
-
Sketch of a Post-ORM
I want sum types.
I want a statically-typed way of constructing composable queries that follow SQL rather than reinvent a different thing. It doesn't have to be the same syntax but it has to be the same structuring.
I started writing one[0] and stopped before doing all the boilerplate code generation, having moved on from the JVM ecosystem for the time being. One thing it does is treat most things like sets so we don't end up with N+1 queries. Another trick it uses is collapsing constant expressions via an expression evaluation library[1].
[0] https://github.com/karmakaze/safeql
[1] https://github.com/karmakaze/moja
-
Ask HN: Tools you have built for yourself?
Over the years, I've written many apps and utilities for myself or others (that didn't end up get used). These are the interesting ones I remember. Many not quite complete/usable. Other than hackerer.news none of them are 'up' and running. Some have and others haven't been published as opensource.
- https://hackerer.news HN viewer (source[0]): I use daily so I can see today's top stories in reverse chronological order with mainstream topics sorted to the bottom.
- qwickly[1] keyboard layout: I use all the time as an easier to learn and more comfortable to type than Colemak/Tarmak
- safeql[2]: Java type-safe SQL expression composer that reduces constant expressions and eliminates N+1 queries loading associations by always operating on set relation or array of models.
- moja[3]: Composable computation pipelines for Java: Async, Lazy, Option, Try, Result, Multi (List), Stated, Reader, Logger, Writer.
- gitgrep.com[4] Opensource SaaS version of etsy/houndd (now called hound-search).
- statuspages.me: Status page aggregator with dynamic javascript for scraping each source using selector expressions.
- movies to watch aggregator: with links to sources to watch. It was hard then to get 3rd party deep links into streaming sites so included some torrent links. Got a DMCA phone call, so took it down. Combined thumbnails, summaries, actors(?), imdb ratings, links.
- java2cpp: Translate a moderately sized java app with test suite to c++, not 100% required final manual fixups.
- swift2java (or maybe it was java2swift, it's fuzzy now): translate Swift to Java obviously, using ANTLR4. Not 100% required final manual fixups.
- gui2log: to make an ASCII rendition of on-screen GUI widgets into an application log file when form submitted, so users couldn't complain that they saw X, but got Y.
- some basic stats/ML algorithms: k-nearest neighbour, RNN back-propagation, etc?
- Java in-memory DB: Small SQL-like memory tables with indexing/searching.
- wwwsqldesigner: This exists as opensource and I extended it to infer foreign key relationships based on naming conventions used in a MySQL schema. It was great for zooming around a large ERD.
- tracelog: combination of microservices parent/child span logging and generated high level events shown as a sequence diagram. Integrated with Loggly for full/verbose logs of selected high-level events.
- pcl2bmp downscaler: Reduce high resolution HP LaserJet (PCL5) printed to file to lower resolution bitmap pages for screen display (before retina DPI was common). It aimed to shrink same-color areas and preserve black/white transitions while reducing.
[0] https://gitlab.com/karmakaze/hackerer-news
[1] https://github.com/qwickly-org/Qwickly
[2] https://github.com/karmakaze/safeql
[3] https://github.com/karmakaze/moja
[4] https://github.com/gitgrep-com/gitgrep
-
Ask HN: ORM or Native SQL?
I completely agree. I pretty much stopped using Spring/Boot because of it, even though it could be used without Hibernate/JPA.
I tried sql2o and later switched to jdbi and Javalin for a lightweight framework. I started making a typesafe library[0] that maps bottom-up like SQL expressions but development as stalled as I haven't been doing much side-project work to use it.
[0] https://github.com/karmakaze/safeql
-
Crazy fast build times (Or when 10 seconds starts to make you nervous)
Interesting choice of JDBI. I was working on an SQL-friendly ORM[0] also due to distaste with Hibernate/JPQL and chose JDBI, not because it was great in any way but it did what I needed and not much else. What influenced your choice and were there any close runner-ups?
[0] https://github.com/karmakaze/safeql
What are some alternatives?
crystal - 🔮 Graphile's Crystal Monorepo; home to Grafast, PostGraphile, pg-introspection, pg-sql2 and much more!
postgres_migrator - A postgres migration generator and runner that uses raw declarative sql.
postgrest - REST API for any Postgres database
slowpokefs - Fuse driver to simulate slow disk IO for testing purposes
supabase - The open source Firebase alternative.
refinery - Powerful SQL migration toolkit for Rust.
edgedb - A graph-relational database with declarative schema, built-in migration system, and a next-generation query language
workflow-cps-plugin
postgres - Unmodified Postgres with some useful plugins
tusker - PostgreSQL migration management tool
supabase-graphql-example - A HackerNews-like clone built with Supabase and pg_graphql
icecream - Distributed compiler with a central scheduler to share build load