useGraphqlListEscrows
useGraphqlListEscrows
Import
import { useGraphqlListEscrows } from "@trustless-work/escrow/hooks/graphql";Signature
function useGraphqlListEscrows(): {
listEscrows: (
variables?: GraphqlListEscrowsVariables,
) => Promise</* GraphqlEscrowPage */>;
};Example
import { useGraphqlListEscrows } from "@trustless-work/escrow/hooks/graphql";
import { useQuery } from "@tanstack/react-query";
const { listEscrows } = useGraphqlListEscrows();
const { data } = useQuery({
queryKey: ["gql-escrows", "mine"],
queryFn: () =>
listEscrows({
scope: "mine",
limit: 20,
sort: "createdAt",
order: "desc",
}),
});
// data → GraphqlEscrowPage (items + cursor fields)