MCPcopy
hub / github.com/ardatan/graphql-tools / getBasicGraphQLMiddleware

Function getBasicGraphQLMiddleware

packages/links/tests/upload.test.ts:62–75  ·  view source on GitHub ↗
(schema: GraphQLSchema)

Source from the content-addressed store, hash-verified

60}
61
62function getBasicGraphQLMiddleware(schema: GraphQLSchema) {
63 return (req: any, res: any) => {
64 Promise.resolve().then(async () => {
65 const { query, variables, operationName } = req.body;
66 const result = await execute({
67 schema,
68 document: parse(query),
69 variableValues: variables,
70 operationName,
71 });
72 res.json(result);
73 });
74 };
75}
76
77describeIf(!globalThis.Bun)('graphql upload', () => {
78 let remoteServer: Server;

Callers 1

upload.test.tsFile · 0.70

Calls 2

executeFunction · 0.90
parseFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…