15 lines
477 B
TypeScript
15 lines
477 B
TypeScript
import pgDataProvider from "ra-postgraphile";
|
|
import schema from "./graphql-schema.json";
|
|
|
|
export const metamigoDataProvider = async (client: any) => {
|
|
const graphqlDataProvider: any = await pgDataProvider(
|
|
client,
|
|
// @ts-expect-error: Missing property
|
|
{},
|
|
{ introspection: { schema: schema.data.__schema } }
|
|
);
|
|
|
|
const dataProvider = async (type: any, resource: any, params: any) => graphqlDataProvider(type, resource, params);
|
|
|
|
return dataProvider;
|
|
};
|