MCPcopy Create free account
hub / github.com/dailydotdev/apps / userProductSummaryQueryOptions

Function userProductSummaryQueryOptions

packages/shared/src/graphql/njord.ts:313–337  ·  view source on GitHub ↗
({
  userId,
  limit,
  type,
}: {
  userId: string;
  limit?: number;
  type: ProductType;
})

Source from the content-addressed store, hash-verified

311};
312
313export 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
339export const CHECK_CORES_ROLE_QUERY = gql`
340 query checkCoresRole {

Callers 2

BadgesAndAwardsFunction · 0.90
GameCenterPageFunction · 0.90

Calls 1

generateQueryKeyFunction · 0.90

Tested by

no test coverage detected