Skip to content
Snippets Groups Projects

feat: make createDataProvider take an rqlClient as input

Merged Frank Bessou requested to merge topic/default/pass-client-to-provider into branch/default
2 files
+ 6
4
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 5
1
@@ -18,6 +18,7 @@
SimpleShowLayout,
DataProvider,
} from "react-admin";
import { client } from "@logilab/cwclientlibjs";
import { createDataProvider } from "ra-cubicweb/dist";
import { schema } from "./schema";
@@ -81,7 +82,10 @@
</Show>
);
const dataProvider = createDataProvider("http://localhost:8080", schema);
const httpClient = new client.CwSimpleHttpClient("http://localhost:8080", true);
const rqlClient = new client.CwRqlClient(httpClient);
const dataProvider = createDataProvider(rqlClient, schema);
dataProvider.getList("toto", {
pagination: { page: 1, perPage: 10 },
sort: { field: "id", order: "ASC" },
Loading