supabase / postgrest-js

Isomorphic JavaScript client for PostgREST.
https://supabase.com
MIT License
967 stars 130 forks source link

rcp() return type does not match SQL function return type #387

Closed joeldomke closed 1 year ago

joeldomke commented 1 year ago

Bug report

I have a SQL function that returns a boolean and Supabase CLI generates the TypeScript types as expected:

Functions: {
    some_function: {
        Args: Record<PropertyKey, never>;
        Returns: boolean;
    };
}

But when I call the function, data has the type boolean[] | null, while I would expect boolean | null.

const { data } = supabaseClient.rpc('some_function')
github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 1.3.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: