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

Function picksQueryOptions

packages/shared/src/graphql/picks.ts:246–254  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

244
245/** Public read, works logged out. Null means the id is unknown. */
246export const picksQueryOptions = (id: string) => ({
247 queryKey: generateQueryKey(RequestKey.Picks, undefined, id),
248 queryFn: async (): Promise<Picks | null> => {
249 const data = await gqlClient.request<{ picks: Picks | null }>(PICKS_QUERY, {
250 id,
251 });
252 return data.picks ?? null;
253 },
254});
255
256export const myCurrentPicksQueryOptions = (user?: Pick<LoggedUser, 'id'>) => ({
257 queryKey: generateQueryKey(RequestKey.Picks, user, 'current'),

Callers 5

renderReturnFunction · 0.90
useSlackShareReturnFunction · 0.90
usePicksEditorFunction · 0.90
PicksPageFunction · 0.90
getServerSidePropsFunction · 0.90

Calls 1

generateQueryKeyFunction · 0.90

Tested by 1

renderReturnFunction · 0.72