We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cf1b64 commit a3223adCopy full SHA for a3223ad
test/index.test-d.ts
@@ -104,6 +104,12 @@ const postgrest = new PostgrestClient<Database>(REST_URL)
104
expectType<{ username: string }[]>(data)
105
}
106
107
+// throw on error with maybeSingle is still nullable
108
+{
109
+ const { data } = await postgrest.from('users').select('username').maybeSingle().throwOnError()
110
+ expectType<{ username: string } | null>(data)
111
+}
112
+
113
// queries without throw on error have nullable results
114
{
115
const { data } = await postgrest.from('users').select('username')
0 commit comments