UNPKG

@nodescript/stdlib

Version:
31 lines (30 loc) 653 B
export const module = { version: '1.0.4', moduleName: 'Flow / Subgraph', params: { scope: { schema: { type: 'object', properties: {}, additionalProperties: { type: 'any' }, } }, }, result: { async: true, schema: { type: 'any', }, }, subgraph: { input: {}, output: { type: 'any', }, }, }; export const compute = async (params, ctx, subgraph) => { const { scope } = params; const value = await subgraph({ ...scope }, ctx.newScope()); return value; };