supabase / postgrest-js

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

Query parser can't parse `id::text` #370

Closed ozanmakes closed 4 months ago

ozanmakes commented 1 year ago

Bug report

Describe the bug

I have BigInt id columns that I have to query with id::text everywhere due to overflow issues (related: #319). However, these queries breaks the ParseQuery type.

To Reproduce

Backed by a column of type BigInt, write a query and typecheck with TypeScript:

  let { data, error } = await supabase
      .from("subscriptions")
      .select("id");

Hover over data to see the inferred type.

Expected behavior

As a result of the query above, id type is computed as string.

Screenshots

image image

If applicable, add screenshots to help explain your problem.

System information