How to use ra-jsonapi-client - 2 common examples

To help you get started, we’ve selected a few ra-jsonapi-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ewels / MegaQC / src / admin.js View on Github external
function App() {
  // Start with a client that has no auth, but immediately request an auth token
  const [token, setToken] = useState(null);

  const provider = jsonapiClient("/rest_api/v1", {
    total: "count",
    arrayFormat: "comma",
    serializerOpts: {
      sample_data: relationships(["report", "sample", "data_type"]),
      samples: relationships(["report", "data", "data_type"]),
      filters: relationships(["user"]),
      filter_groups: relationships(),
      reports: relationships(["meta", "samples", "user"]),
      uploads: relationships(["user"]),
      report_meta: relationships(["report"]),
      favourites: relationships(["user"]),
      dashboards: relationships(["user"]),
      report_meta_types: relationships(),
      users: relationships(["reports"])
    },
    deserializerOpts: {
github perdy / flama / admin-client / src / App.js View on Github external
import React from 'react';
import { Admin, Resource, ListGuesser } from 'react-admin';
import jsonApiClient from 'ra-jsonapi-client';

const jsonApiSettings = {
  total: 'count',
  updateMethod: 'PUT',
};
const dataProvider = jsonApiClient('http://localhost:8000/', jsonApiSettings);


const App = () => (
  
    
  
);

export default App;

ra-jsonapi-client

JSON API data provider for react-admin.

MIT
Latest version published 2 years ago

Package Health Score

39 / 100
Full package analysis

Popular ra-jsonapi-client functions