1.2.1 • Published 1 year ago

@jambff/ra-data-provider v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

React Admin Data Provider

A data provider for React Admin that integrates with JamBFF APIs.

Installation

yarn add @jambff/ra-data-provider

Usage

import { createDataProvider } from '@jambff/data-provider';

const dataProvider = createDataProvider('http://api.example.com');

Authentication

If you need to make authenticated requests you can override the fetch client, for example:

import { createDataProvider } from '@jambff/data-provider';
import { createClient } from '@supabase/supabase-js';
import { createAuthenticatedFetch } from '@jambff/supabase-auth-fetch';

const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_ANON_KEY);
const fetch = createAuthenticatedFetch(supabase);

const dataProvider = createDataProvider('http://api.example.com', { fetch });
1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago