示例#1
0
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!');
};
示例#2
0
 setInterval(() => {
   mainStory.debug('server', `t: ${chalk.blue(new Date().toISOString())}`);
 }, 60000);