-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subscribe to Views / Multiple Rows / Multiple Columns #185
Comments
Yes, we can generate a unique string on the client's behalf if one is not provided.
Would love to hear more about this one. What do you mean by these classes and methods? How does it not support basic use cases? We have discussed queries/views/graphql subscriptions internally and we'll explore it further before we prioritize it. I'll post updates here as we continue to discuss internally. |
The What seems easier to understand: 1 supabaseClient
.channel('any_string_you_want')
.on(
'postgres_changes',
{
event: 'INSERT',
schema: 'public',
table: 'movies',
},
(payload) => {
console.log(payload)
}
)
.subscribe() 2 const mySubscription = supabase
.from('*')
.on('*', payload => {
console.log('Change received!', payload)
})
.subscribe() I understand the broadcasting feature seems pretty cool to have. However, you have over complicated the subscription process for people who just want to subscribe to the database. I don't know that the broadcasting feature is really important or useful to most people when you could just store items in the database directly and subscribe to that. Perhaps a good compromise would be to add another method that emulates the promise method for postgres. This perhaps would call the unintuitive method # 1 that you have created for supabase-js-v2. In most cases, I don't need to think about a public schema, I don't need to think about a channel name, and I don't need to think about an event. I want to subscribe to:
The broadcasting feature is pretty cool, but we still don't have the NEEDED features with postgres subscriptions.
Yes, web sockets in Supabase for the moment are very very limiting, and you guys don't seem to have the fixes on your roadmap just yet. Let's change that please. J |
Are there any updates regarding these issues? |
It looks like they may have added the main six: I have added it to my j-supabase package, although I admit, I have not tested this yet. But again, we need ALL filters that are available on JS sdk, and the ability to use more than one. I am taking this as HOPE that this is becoming a priority, as it should. J |
That surely is a step in the right direction. However without @w3b6x9 (or any other maintainer) could you please give an update on the status of this feature? |
@jdgamble555 this is good feedback here: #185 (comment). Will look it over and pass it on to the rest of the team. Also, what do you mean by
Yes, these filters are available. We plan to integrate this Rust worker that improves the performance of filters and will revisit adding additional filters, and/or, etc. |
Yes, I was referring to The reality is, when you need to watch changes in multiple records or queries, you need a way to filter them. One filter is simply not enough, as it would not be in any database.
The order of importance in my opinion, is the following:
It would be nice to see any filter Another option to consider in order to get complex realtime filtering, is to make GraphQL Subscriptions, and use the filters in GraphQL. J |
+1 for sure. Also, a lot of this issue seems very similar to "Query subscriptions" #221 |
I could use this feature as well |
Feature request
I would like to subscribe to a query itself, not a table. I don't need multiple subscriptions, just one for the query. If the query changes (not always important if INSERT, UPDATE, or DELETE), I would like my observable to get updated.
Currently, we can only use this complicated
subscribe
version of this query:Promise
Subscription
Is your feature request related to a problem? Please describe.
eq
should be a separate methodgt, ls, filter, like
, etc).Views
should be available for subscriptions (NOT CLEAR AT ALL)Describe the solution you'd like
V2 is Getting MORE Complicated, and LESS Intuitive
https://supabase.com/blog/supabase-js-v2
While the multiplayer mode looks cool, let's complete the actual limitations of the current realtime data before moving on to more features!
GraphQL Subscription
support.VIEWS
to be subscribed to would solve this problem for now.Describe alternatives you've considered
I don't think there should be an alternative. In order for it to be easy, it should work just like the regular queries, but with a subscription.
All of these Database work the exact same way in Query mode as Subscription mode, and allow complex queries (as far as the database itself can handle):
Additional context
Related:
supabase/realtime#271
#97
supabase/supabase#1206
supabase/realtime#222
supabase/supabase#3193
supabase/supabase#3748
supabase/supabase#5684
supabase/supabase#7735
The text was updated successfully, but these errors were encountered: