Skip to content

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

Open
@rcwestlake

Description

@rcwestlake

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions