Graphql query error while export data
Why not a valid graphql query error showing while export the data using useExport, also i have gave the resource name
useExport hook and ensure your GraphQL query is valid.Note: you can ask me a follow up question by @ mentioning me again useExport hook:resourceName prop is deprecated, and you should use the resource prop instead. Here's an example of the change:Note: you can ask me a follow up question by @ mentioning me again useExportuseExportNote: you can ask me a follow up question by @ mentioning me againNote: you can ask me a follow up question by @ mentioning me againresourceNameimport { useExport } from "@refinedev/core";
interface IPost {
id: number;
slug: string;
title: string;
content: string;
}
export const PostList: React.FC = () => {
const { triggerExport } = useExport<IPost>();
return (
<div>
<button onClick={triggerExport}>Export Button</button>
...
</div>
);
};useExport({
- resourceName,
+ resource,
- sorter,
+ sorters,
})