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 } }
  );
  return graphqlDataProvider;
};
