在 nextjs 的 apollo 客户端中添加 SORT

问题描述 投票:0回答:0

如何在 apollo 查询中添加排序参数?

这是我的客户端组件.tsx

 const { data, loading } = useQuery(GET_ALL_SHIPMENTS);

和查询.tsx

import { gql } from "@apollo/client"

export const GET_ALL_SHIPMENTS = gql`
query getAllShipments {
  getAllShipments{
    id
    title
    description
  }
}
`;


typescript next.js graphql apollo
© www.soinside.com 2019 - 2024. All rights reserved.