supabase / postgrest-js

Isomorphic JavaScript client for PostgREST.
https://supabase.com
MIT License
1.03k stars 133 forks source link

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

Open rcwestlake opened 11 months ago

rcwestlake commented 11 months ago

Bug report

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

Additional context

Add any other context about the problem here.