()
| 1032 | }); |
| 1033 | |
| 1034 | function makeHandler() { |
| 1035 | const handler = new RPCApiHandler({ schema: client.$schema }); |
| 1036 | return async (args: any) => { |
| 1037 | const r = await handler.handleRequest({ |
| 1038 | ...args, |
| 1039 | url: new URL(`http://localhost/${args.path}`), |
| 1040 | }); |
| 1041 | return { |
| 1042 | status: r.status, |
| 1043 | body: r.body as any, |
| 1044 | data: (r.body as any).data, |
| 1045 | error: (r.body as any).error, |
| 1046 | meta: (r.body as any).meta, |
| 1047 | }; |
| 1048 | }; |
| 1049 | } |
| 1050 | }); |
no test coverage detected