({
userId,
limit,
type,
}: {
userId: string;
limit?: number;
type: ProductType;
})
| 289 | }; |
| 290 | |
| 291 | export const userProductSummaryQueryOptions = ({ |
| 292 | userId, |
| 293 | limit, |
| 294 | type, |
| 295 | }: { |
| 296 | userId: string; |
| 297 | limit?: number; |
| 298 | type: ProductType; |
| 299 | }) => { |
| 300 | return { |
| 301 | queryKey: generateQueryKey(RequestKey.Products, undefined, 'summary', { |
| 302 | userId, |
| 303 | limit, |
| 304 | type, |
| 305 | }), |
| 306 | queryFn: async () => { |
| 307 | const result = await gqlClient.request<{ |
| 308 | userProductSummary: UserProductSummary[]; |
| 309 | }>(PRODUCTS_SUMMARY_QUERY, { userId, limit, type }); |
| 310 | |
| 311 | return result.userProductSummary; |
| 312 | }, |
| 313 | staleTime: StaleTime.Default, |
| 314 | }; |
| 315 | }; |
| 316 | |
| 317 | export const CHECK_CORES_ROLE_QUERY = gql` |
| 318 | query checkCoresRole { |
no test coverage detected