I'm in love with `pg_graphql` extension and it wou...
# ideas-and-suggestions
i
I'm in love with
pg_graphql
extension and it would be really nice to have also subscriptions to make it more complete!
s
There's a few caveats to keep in mind: - Realtime already exists, and there are plans to expand it even more later in the year - The concept of subscriptions aren't part of the GQL spec - Apollo notes that the older
subscriptions-transport-ws
library is no longer maintained, and
graphql-ws
uses a different subprotocol (https://www.apollographql.com/docs/react/data/subscriptions/#choosing-a-subscription-library), which makes compatibility a concern - Implementing RLS support on realtime took a long time and lot of work. Would it be worth it to duplicate such functionality into GraphQL? I'm curious to hear what benefits you think it'd bring over an improved version of the core realtime functionality of Supabase.
i
I'd like to use the GraphQL endpoint as a single source of truth for my clients, and having also subscriptions available without using the supabase client would be nice I think. Speaking about Typescript, it would be great also for tools like
graphql-codegen
, because it would make it, again, the single source of truth for typings in the source code