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

Function pluginQueryOptions

packages/shared/src/graphql/plugins.ts:239–252  ·  view source on GitHub ↗
(
  id: string,
  user?: Pick<LoggedUser, 'id'>,
)

Source from the content-addressed store, hash-verified

237});
238
239export const pluginQueryOptions = (
240 id: string,
241 user?: Pick<LoggedUser, 'id'>,
242) => ({
243 queryKey: generateQueryKey(RequestKey.Plugin, user, id),
244 queryFn: async (): Promise<Plugin> => {
245 const { plugin } = await gqlClient.request<PluginData>(PLUGIN_QUERY, {
246 id,
247 });
248
249 return plugin;
250 },
251 staleTime: StaleTime.Default,
252});
253
254export const myPluginsQueryOptions = (userId?: string) => ({
255 queryKey: generateQueryKey(

Callers 3

getPluginFunction · 0.90
PluginPageFunction · 0.90

Calls 1

generateQueryKeyFunction · 0.90

Tested by 1

getPluginFunction · 0.72