Skip to content

implementation questions #5

@hyusetiawan

Description

@hyusetiawan

This is such a promising library, I am playing around with to see it matches with our current stack:

  • tanstack start app server
  • drizzle + postgres
  • graphql as the transport layer
  • pothos as the graphql builder

I envision that the integration points are:

  • drizzle -> raw sql string -> linkedql with {live: true}
  • graphql expose subscription operations instead of just query
  • magic
  • we got a realtime graphql backed fully typed app

My questions are:

  • For Postgres RLS that depends on current_setting('claims.user_id', true), how do you recommend setting per-request session claims on the exact connection that executes a live query?
  • Can two users with different session claims safely share the same LinkedQL live-query engine instance or query window, or must they be isolated per user/claims set?
  • If live queries are deduped internally, what is the dedupe boundary: SQL text only, SQL + params, or SQL + auth/session state?
  • For a stack that uses Drizzle only as schema and SQL builder, is there a recommended integration pattern where we compile Drizzle queries to SQL and run them through LinkedQL for reads?
  • Do you see any issue with this split: LinkedQL for reads/subscriptions, Drizzle transactions for mutations? We open a transaction for all of our mutations per request.
  • What exact Postgres setup is required in production: replication slot privileges, publication creation, REPLICA IDENTITY FULL requirements, FOR ALL TABLES vs explicit publication membership?
  • Can LinkedQL run against a normal pooled app connection plus a separate replication connection, or does reliable live-query + RLS require pinned non-pooled connections?
  • What are the current sharp edges or known missing pieces for Postgres live queries that would most affect a small but real multi-user app?

Apologies for the barrage of questions!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions