-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Unify sync and async clients #697
Comments
On a related note, would it make sense to return the relevant go-true client directly in /cc @J0 , @olirice , @silentworks |
There are no manual duplication being done in the codebase as we have a |
Thanks @silentworks. Yeah, in that case I don't see any reason to check in the generated That said, I'd feel more confident in releasing code that we actively maintain and track in version control and has sufficient test coverage. Hence, making this unification attempt. Please correct me if I'm wrong^ |
Just a heads up that there is a WIP changeset over at tinvaan#2 |
Is there a simple working minimal tutorial for the async client? |
+1, could we have some examples of FastAPI + async supabase client initialization? |
[This is more of a question at this point and not a feature request as such, so I'm diverging from the issue template.]
I noticed that there is a ton of shared and redundant code between the sync and async client classes. From what I'm seeing, there is only one place where a coroutine gets
await
ed in the async class (i.e while fetching the session token fromAsyncGoTrueClient
).Does it make sense then to attempt to converge the two classes into one? if not, what are some of the challenges in doing so?
I've attempted a converge at tinvaan#2 . It's very early days still and I haven't had a chance to test the changes completely yet. But interestingly we can get rid of a lot of redundant code in this approach and as you can see in the linked PR, the code coverage jumps up significantly as a result.
However, I'd like to hear the community's thoughts on if this was attempted before or if indeed such a change makes sense.
The text was updated successfully, but these errors were encountered: