Skip to content
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

Type safety is not being adhered on insert queries #508

Open
dvrfluxchat opened this issue Nov 28, 2023 · 1 comment
Open

Type safety is not being adhered on insert queries #508

dvrfluxchat opened this issue Nov 28, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@dvrfluxchat
Copy link

dvrfluxchat commented Nov 28, 2023

I have a insert query in my db which looks like this and I am using the typescript version of supabase-js.

await supaServiceClient
        .from("table_name")
        .insert({
          column1:value,
          column2:value,
          column3:value
        });

I changed the column "column1" to "newColumn1" but the above query did not throw any errors where there is no "column1". This lead to issues in production where this query stopped working as the insert was failing saying there is no column1 but the compiler did not throw any error. Is this the expected behaviour? If so how do i ensure to get compile time warnings for such scenarios.

@dvrfluxchat dvrfluxchat added the bug Something isn't working label Nov 28, 2023
@steve-chavez steve-chavez transferred this issue from supabase/supabase-js Nov 28, 2023
@tecoad
Copy link

tecoad commented May 4, 2024

I have the same issue. Did you find out @dvrfluxchat ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants