pg_graphql VS assert-combinators

Compare pg_graphql vs assert-combinators and see what are their differences.

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
pg_graphql assert-combinators
8 5
2,769 23
1.3% -
9.4 5.7
5 days ago 3 months ago
Rust TypeScript
Apache License 2.0 GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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

Posts with mentions or reviews of pg_graphql. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-02.
  • Is it just me or is the Supabase GraphQL API really bad?
    1 project | /r/webdev | 7 Dec 2023
    Hi, I'm the author of Supabase GraphQL (pg_graphql)
  • Sketch of a Post-ORM
    14 projects | news.ycombinator.com | 2 Jun 2023
  • AWS Amplify Is a Grift
    2 projects | news.ycombinator.com | 10 Apr 2023
  • Type Constraints in 65 lines of SQL
    5 projects | news.ycombinator.com | 17 Feb 2023
    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?
    1 project | /r/Supabase | 7 Jan 2023
    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
    8 projects | /r/golang | 18 Dec 2022
    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
    12 projects | news.ycombinator.com | 28 May 2022
    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
    14 projects | news.ycombinator.com | 29 Mar 2022
    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/

assert-combinators

Posts with mentions or reviews of assert-combinators. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-24.
  • Kysely: TypeScript SQL Query Builder
    19 projects | news.ycombinator.com | 24 Jan 2023
    We use in prod variant of no 1. [0]. Why? Because:

    * it's extremely lightweight (built on pure, functional combinators)

    * it allows us to use more complex patterns ie. convention where every json field ends with Json which is automatically parsed; which, unlike datatype alone, allows us to create composable query to fetch arbitrarily nested graphs and promoting single [$] key ie. to return list of emails as `string[]` not `{ email: string }[]` with `select email as [$] from Users` etc.

    * has convenience combinators for things like constructing where clauses from monodb like queries

    * all usual queries like CRUD, exists etc. and some more complex ie. insertIgnore, merge1n etc has convenient api

    We resort to runtime type assertions [1] which works well for this and all other i/o; runtime type assertions are necessary for cases when your running service is incorrectly attached to old or future remote schema (there are other protections against it but still happens).

    [0] https://github.com/appliedblockchain/tsql

    [1] https://github.com/appliedblockchain/assert-combinators

  • GraphJin – An Instant GraphQL to SQL Compiler
    12 projects | news.ycombinator.com | 28 May 2022
    We use not so much frameworks but combination of lightweight libraries:

    - runtime assertions [0] - to map unknown values at i/o boundary into statically typed code (rpc input parameters, sql results etc)

    - template based sql combinators to sanitize sql/generate sql [1]

    - jsonrpc over websockets - for bidirectional comms between f/e and b/e

    [0] https://github.com/appliedblockchain/assert-combinators

    [1] https://github.com/appliedblockchain/tsql

  • Parser Combinators in Haskell
    10 projects | news.ycombinator.com | 22 Dec 2021
  • An Inconsistent Truth: Next.js and Typesafety
    5 projects | news.ycombinator.com | 2 Dec 2021
    Types can be asserted at runtime (parsed) at IO boundaries (reading http request or response, websocket message, parsing json file etc). Once they enter statically type system they don't need to be asserted again.

    The difference it makes is illusion of type-safety vs type-safety this article touches on.

    You can try to bind service with client somehow but in many cases this will fail in production as you can't guarantee paired versioning, due to normal situations by design of your architecture or temporary mid-deployment state or other team doing something they were not suppose to do etc. It's hard to avoid runtime parsing in general.

    Functional combinators [0] or faster [1] with predicate/assert semantics work very well with typescript, which is very pleasant language to work with.

    [0] https://github.com/appliedblockchain/assert-combinators

    [1] https://github.com/preludejs/refute

  • Parsix: Parse Don't Validate
    6 projects | news.ycombinator.com | 15 May 2021
    Once i/o boundaries are parsing unknown types into static types, your type safety is guaranteed.

    [0] https://github.com/appliedblockchain/assert-combinators

What are some alternatives?

When comparing pg_graphql and assert-combinators you can also consider the following projects:

crystal - 🔮 Graphile's Crystal Monorepo; home to Grafast, PostGraphile, pg-introspection, pg-sql2 and much more!

httpaf - A high performance, memory efficient, and scalable web server written in OCaml

postgrest - REST API for any Postgres database

pyparsing - Python library for creating PEG parsers

supabase - The open source Firebase alternative.

refute - Refute module.

edgedb - A graph-relational database with declarative schema, built-in migration system, and a next-generation query language

angstrom - Parser combinators built for speed and memory efficiency

postgres - Unmodified Postgres with some useful plugins

parser - String parser combinators

supabase-graphql-example - A HackerNews-like clone built with Supabase and pg_graphql

generator - Generator module.