Skip to main content
Glama
components.ts926 B
import { v } from "convex/values"; import { components } from "./_generated/api"; import { action, mutation, query } from "./_generated/server"; export const CACHE_BREAKER_ARGS = { cacheBreaker: v.number() }; export const componentQuery = query({ args: CACHE_BREAKER_ARGS, handler: async (ctx) => { return await ctx.runQuery(components.counterComponent.public.load); }, }); export const componentMutation = mutation({ args: {}, handler: async (ctx) => { return await ctx.runMutation(components.counterComponent.public.increment); }, }); export const componentAction = action({ args: {}, handler: async (ctx) => { const count = Math.floor(Math.random() * 4) + 1; await ctx.runAction(components.counterComponent.public.reset, { count }); await ctx.runMutation(components.counterComponent.public.increment); return await ctx.runQuery(components.counterComponent.public.load); }, });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/get-convex/convex-backend'

If you have feedback or need assistance with the MCP directory API, please join our Discord server