Skip to main content
Glama
get.ts1.11 kB
import { GraphQLResolveInfo } from 'graphql'; import { telemetryClient } from '../../utils/telemetry.js'; import { Context } from '../types.js'; export const getApiResolver = async ( _: any, { id }: { id: string; }, context: Context, info: GraphQLResolveInfo ) => { if (!id) { throw new Error("id is required"); } const config = await context.datastore.getApiConfig({ id, orgId: context.orgId }); if (!config) { telemetryClient?.captureException(new Error(`api config with id ${id} not found`), context.orgId, { id: id, }); throw new Error(`api config with id ${id} not found`); } return config; }; export const getRunResolver = async ( _: any, { id }: { id: string; }, context: Context, info: GraphQLResolveInfo ) => { if (!id) { throw new Error("id is required"); } const run = await context.datastore.getRun({ id, orgId: context.orgId }); if (!run) { telemetryClient?.captureException(new Error(`run with id ${id} not found`), context.orgId, { id: id, }); throw new Error(`run with id ${id} not found`); } return run; };

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/superglue-ai/superglue'

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