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

Function myPluginsQueryOptions

packages/shared/src/graphql/plugins.ts:254–267  ·  view source on GitHub ↗
(userId?: string)

Source from the content-addressed store, hash-verified

252});
253
254export const myPluginsQueryOptions = (userId?: string) => ({
255 queryKey: generateQueryKey(
256 RequestKey.MyPlugins,
257 userId ? { id: userId } : undefined,
258 ),
259 queryFn: async (): Promise<Plugin[]> => {
260 const { myPlugins } = await gqlClient.request<{
261 myPlugins: Connection<Plugin>;
262 }>(MY_PLUGINS_QUERY);
263
264 return myPlugins.edges.map(({ node }) => node);
265 },
266 enabled: !!userId,
267});
268
269export const myPluginSubmissionsQueryOptions = (userId?: string) => ({
270 queryKey: generateQueryKey(

Callers 2

PluginSubmissionsPageFunction · 0.90
SubmitPluginPageFunction · 0.90

Calls 1

generateQueryKeyFunction · 0.90

Tested by

no test coverage detected