supabase / postgrest-js

Isomorphic JavaScript client for PostgREST.

Home Page:https://supabase.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

ozanmakes opened this issue · comments

commented

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

  • OS: macOS
  • Version of @supabase/postgrest-js: 1.1.0
  • Version of @supabase/supabase-js: 2.1.0
  • Version of Node.js: v16.14.0