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

Javascript SDK types don't pick up a not null filter #485

Open
2 tasks done
rcwestlake opened this issue Oct 6, 2023 · 0 comments
Open
2 tasks done

Javascript SDK types don't pick up a not null filter #485

rcwestlake opened this issue Oct 6, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@rcwestlake
Copy link

rcwestlake commented Oct 6, 2023

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Using the @supabase/supabase-js package, I have a select operation with a not filter to exclude null values. However, the "type" still thinks there could be null values returned in the data set. Later on in code, I have something that expects the ticket_id field to not be null but I have to add a filter to pass the type checks.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create a table with a field that can be a text or null
  2. Using the Javascript SDK, add a query which selects data and has a .not("your_field", "eq", null)

Expected behavior

The type should pick up that the your_field cannot be null

Screenshots

image

System information

  • OS: mac
  • Version of supabase-js: 2.36.0
  • Version of Node.js: 20.5.1

Additional context

Add any other context about the problem here.

@rcwestlake rcwestlake added the bug Something isn't working label Oct 6, 2023
@saltcod saltcod transferred this issue from supabase/supabase Oct 10, 2023
@steve-chavez steve-chavez transferred this issue from supabase/supabase-js Oct 10, 2023
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

1 participant