Patch Changes
-
#5409
0026fe34d0
Thanks @BatuhanW! - fix: excludegqlMutation
andgqlQuery
from building query keys foruseUpdate
,useUpdateMany
,useDelete
, anduseDeleteMany
hooks. -
#5409
0026fe34d0
Thanks @BatuhanW! - feat: add optionalgqlQuery
andgqlMutation
fields toMetaQuery
type to be used indata hooks
.We plan to utilize these fields on our GraphQL data providers in the future.
You can build your queries/mutations with
graphql-tag
package and pass it to thegqlQuery
/gqlMutation
fields.For now, only
@refinedev/nestjs-query
package supports it.import { useList } from "@refinedev/core"; import gql from "graphql-tag"; const PRODUCTS_QUERY = gql` query ProductsList( $paging: OffsetPaging! $filter: BlogPostFilter $sorting: [BlogPostSort!]! ) { products(paging: $paging, filter: $filter, sorting: $sorting) { nodes { id name } totalCount } } `; const { data } = useList({ resource: "products", meta: { gqlQuery: PRODUCTS_QUERY }, });