(schema: GraphQLSchema)
| 60 | } |
| 61 | |
| 62 | function 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 | |
| 77 | describeIf(!globalThis.Bun)('graphql upload', () => { |
| 78 | let remoteServer: Server; |
no test coverage detected
searching dependent graphs…