meta object in Refine hooks to write your own custom queries and mutations. Here's an example of how to use it:useDataGrid, , useShow, , etc. Here's an example:meta object. Here's an example:meta object in the useTable hook. The property of the meta object allows you to specify the variables that should be passed to the query.id variable to the query. Here's how it looks in your code:id variable (with a value of ) to the query.status variable, you could do it like this:id and status variables to the query.meta object in the useTable hook. The property of the meta object allows you to specify the variables that should be passed to the query.id variable is passed to the GraphQL query.meta object match the variables expected by your GraphQL query.meta object. Make sure that you're correctly defining the meta object and its property. The property should be an object, where each key-value pair represents a variable and its value.useTable hook. Make sure that you're correctly using the useTable hook. The resource property should be a string that represents the resource you're querying, and the meta property should be an object that includes the and properties.useListuseListuseListgqlQuerygqlQueryPOSTS_LIST_QUERYmetaDatauseEdituseCustomvariablesvariablesvariablesvariablesvariablesvariablesQUERY_SINGLE_USER_LEAVEQUERY_SINGLE_USER_LEAVEQUERY_SINGLE_USER_LEAVEidentity?.idYOUR_GRAPHQL_QUERYimport { useList } from "@refinedev/core";
const MyComponent = () => {
const { data, isLoading } = useList<IPost>({
resource: "posts",
filters: [
{
field: "title",
operator: "contains",
value: "foo",
},
],
});
};import { useList } from "@refinedev/core";
import { POSTS_LIST_QUERY } from "./queries";
const MyComponent = () => {
const { data, isLoading } = useList({
resource: "posts",
meta: { gqlQuery: POSTS_LIST_QUERY },
});
};const {
dataGridProps,
} = useDataGrid<IItem>({
resource: 'NPI_sample_data',
initialPageSize: 20,
initialSorter: [
{
field: 'npi_id',
order: 'asc'
}
],
metaData: {
operation: "NPI_sample_data",
fields: ["npi_id"]
}
})import { useCustom } from "@refinedev/core";
const { data, isLoading } = useCustom({
resource: "posts",
meta: {
operation: "MyCustomOperation",
fields: ["id", "title"],
},
});meta: {
variables: {
id: identity?.id,
},
gqlQuery: QUERY_SINGLE_USER_LEAVE,
},meta: {
variables: {
id: identity?.id,
status: 'PENDING',
},
gqlQuery: QUERY_SINGLE_USER_LEAVE,
},const { tableProps } = useTable({
resource: "posts",
meta: {
variables: {
id: "123",
},
gqlQuery: YOUR_GRAPHQL_QUERY,
},
});