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

Function userProductSummaryQueryOptions

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

Source from the content-addressed store, hash-verified

289};
290
291export 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
317export const CHECK_CORES_ROLE_QUERY = gql`
318 query checkCoresRole {

Callers 2

BadgesAndAwardsFunction · 0.90
GameCenterPageFunction · 0.90

Calls 1

generateQueryKeyFunction · 0.90

Tested by

no test coverage detected