Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/edgarbarrantes/supabase-utils
SWR wrapper, serverside fetcher and utils for Supabase
https://github.com/edgarbarrantes/supabase-utils
hooks nextjs react react-hooks supabase swr
Last synced: 4 months ago
JSON representation
SWR wrapper, serverside fetcher and utils for Supabase
- Host: GitHub
- URL: https://github.com/edgarbarrantes/supabase-utils
- Owner: EdgarBarrantes
- Created: 2021-08-07T14:43:14.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-12T23:23:37.000Z (over 3 years ago)
- Last Synced: 2024-05-04T08:02:24.436Z (9 months ago)
- Topics: hooks, nextjs, react, react-hooks, supabase, swr
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@edgarbarrantes/supabase-swr
- Size: 370 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Supabase utilities for consuming data
Monorepo that includes several packages related to interactions (mainly fetching data for now) with supabase.
### Supabase SWR
Allows using [SWR](https://swr.vercel.app/) with simple supabase queries.
[Examples](https://github.com/EdgarBarrantes/supabase-utils/blob/master/packages/supabase-swr/README.md)
#### Instalation
```bash
npm i @edgarbarrantes/supabase-swr
```### Supabase fetcher
Allows fetching supabase data from the serverside getting the token from the api call. Useful for NextJS getServerSideProps.
[Examples](https://github.com/EdgarBarrantes/supabase-utils/blob/master/packages/supabase-fetcher/README.md)
#### Installation
```bash
npm i @edgarbarrantes/supabase-fetcher
```### Supabase fetcher helpers
Includes a fetcher function and helpers. Used by the other packages, might be useful if you want to build something with it, not recomended to be used inside a project.
[Examples](https://github.com/EdgarBarrantes/supabase-utils/blob/master/packages/supabase-fetcher-helpers/README.md)
#### Instalation
```bash
npm i @edgarbarrantes/supabase-fetcher-helpers
```## Notes
The `select` parameter can receive either the column's name, or the table there is a relationship with, for example: `chains(namespace,reference,name)`, where chains in the table the current table has a relationship with.