const run = async () => { mainStory.info('gqlUpdate', 'Introspecting...'); const result = await gqlServer.runIntrospect(); let filePath = path.join(outputPath, 'gqlSchema.json'); mainStory.info('gqlUpdate', `Writing ${chalk.cyan(filePath)}...`); fs.writeFileSync(filePath, JSON.stringify(result, null, 2)); filePath = path.join(outputPath, 'gqlSchema.graphql'); mainStory.info('gqlUpdate', `Writing ${chalk.cyan(filePath)}...`); fs.writeFileSync(filePath, gqlServer.getSchemaShorthand()); mainStory.info('gqlUpdate', 'Done!'); };
setInterval(() => { mainStory.debug('server', `t: ${chalk.blue(new Date().toISOString())}`); }, 60000);