Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public async updatePreviousSchema(newSchema: string) {
if (!existsSync(this.oldSchemaDir)) {
mkdirSync(this.oldSchemaDir);
}
await removeFiles(join(this.oldSchemaDir, '*.graphql'));
writeFileSync(join(this.oldSchemaDir, 'Previous.graphql'), newSchema);
}
}