({
userId,
limit,
type,
}: {
userId: string;
limit?: number;
type: ProductType;
})
| 311 | }; |
| 312 | |
| 313 | export const userProductSummaryQueryOptions = ({ |
| 314 | userId, |
| 315 | limit, |
| 316 | type, |
| 317 | }: { |
| 318 | userId: string; |
| 319 | limit?: number; |
| 320 | type: ProductType; |
| 321 | }) => { |
| 322 | return { |
| 323 | queryKey: generateQueryKey(RequestKey.Products, undefined, 'summary', { |
| 324 | userId, |
| 325 | limit, |
| 326 | type, |
| 327 | }), |
| 328 | queryFn: async () => { |
| 329 | const result = await gqlClient.request<{ |
| 330 | userProductSummary: UserProductSummary[]; |
| 331 | }>(PRODUCTS_SUMMARY_QUERY, { userId, limit, type }); |
| 332 | |
| 333 | return result.userProductSummary; |
| 334 | }, |
| 335 | staleTime: StaleTime.Default, |
| 336 | }; |
| 337 | }; |
| 338 | |
| 339 | export const CHECK_CORES_ROLE_QUERY = gql` |
| 340 | query checkCoresRole { |
no test coverage detected