mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
* feat(blog): Add React Query post. * feat(examples): Add React Query example. * Apply suggestions from code review Thank you 💚 Co-authored-by: Philipp Steinrötter <philipp@steinroetter.com> * chore: update og image. --------- Co-authored-by: Philipp Steinrötter <philipp@steinroetter.com>
16 lines
288 B
TypeScript
16 lines
288 B
TypeScript
import { TypedSupabaseClient } from '@/utils/types'
|
|
|
|
export function getCountryById(client: TypedSupabaseClient, countryId: number) {
|
|
return client
|
|
.from('countries')
|
|
.select(
|
|
`
|
|
id,
|
|
name
|
|
`
|
|
)
|
|
.eq('id', countryId)
|
|
.throwOnError()
|
|
.single()
|
|
}
|