supabase / supabase-js

An isomorphic Javascript client for Supabase. Query your Supabase database, subscribe to realtime events, upload and download files, browse typescript examples, invoke postgres functions via rpc, invoke supabase edge functions, query pgvector.
https://supabase.com
MIT License
2.83k stars 219 forks source link

TS `ParserError` for spread operation in `select` #988

Open xiaohai-huang opened 1 month ago

xiaohai-huang commented 1 month ago

Bug report

Describe the bug

See the screenshot below.

To Reproduce

https://github.com/FHFHockey-dev/fhfhockey.com/blob/101a0533f56581e1c699f9a7ccad2c9f856c1053/web/components/LineCombinations/utilities.ts#L45

 const { data: lineCombinations } = await supabase
    .from("lineCombinations")
    .select(
      "gameId, teamId, forwards, defensemen, goalies, ...games (startTime)"
    )
    .eq("teamId", teamId)
    .in("gameId", [last10Games[0].id, last10Games[1].id])
    .order("games(startTime)", { ascending: false })

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

image

System information