The [Refine](https://refine.dev/) Data Provider for [Hygraph](https://hygraph.com/) CMS.
npm install @acomagu/refine-hygraphThe Refine Data Provider for Hygraph CMS.
``typescript
import { HygraphDataProvider } from '@acomagu/refine-hygraph';
const client = new GraphQLClient('https://api-ap-northeast-1.hygraph.com/v2/clglyffrp4fsi01t27v71g8yw/master');
const hygraphDataProvider = new HygraphDataProvider(client);
const inferencerPredefinedMeta = {
'posts': {
default: {
fields: ['id', 'title', 'content'],
},
},
};
export default function App() {
return (
...
notificationProvider={notificationProvider}
routerProvider={routerBindings}
i18nProvider={i18nProvider}
resources={[
{
name: "posts",
list: "/posts",
create: "/posts/create",
edit: "/posts/edit/:id",
show: "/posts/show/:id",
},
]}
options={{
syncWithLocation: true,
warnWhenUnsavedChanges: true,
projectId: "xvdgqS-wKSisU-njA9CD",
}}
>
element={
/>
element={
/>
element={
/>
...
);
}
``