@edgarbarrantes/supabase-fetcher-helpers
TypeScript icon, indicating that this package has built-in type declarations

0.1.16 • Public • Published

Supabase fetcher helpers

Includes a fetcher function and helpers.

const apiKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY // Or however you store you're key.
const fetcher = getFetcher(apiKey)

const token = session.access_token // User's access token.
const apiUrl = process.env.NEXT_PUBLIC_SUPABASE_URL // https://something.supabase.co
const table = 'consumers'
const { select, filterString, rangeString } = getOptions(fields, filters, range)

const data = await fetcher(
  token,
  apiUrl,
  table,
  select,
  filterString,
  rangeString,
)

Readme

Keywords

Package Sidebar

Install

npm i @edgarbarrantes/supabase-fetcher-helpers

Weekly Downloads

1

Version

0.1.16

License

ISC

Unpacked Size

8.68 kB

Total Files

18

Last publish

Collaborators

  • edgarbarrantes