Publish GraphQL contract from backend
Build and deploy Backend / build (push) Successful in 5m4s

This commit is contained in:
Ruslan Bakiev
2026-06-12 14:47:58 +07:00
parent 24fc6179e3
commit 80a729fa6e
6 changed files with 126 additions and 109 deletions
+10
View File
@@ -0,0 +1,10 @@
import { mkdir, writeFile } from 'node:fs/promises';
import { dirname, resolve } from 'node:path';
import { typeDefs } from '../src/graphql/type-defs.js';
const schemaPath = resolve('graphql-contracts/schema.graphql');
const schema = typeDefs.trim().replace(/^ /gm, '');
await mkdir(dirname(schemaPath), { recursive: true });
await writeFile(schemaPath, `${schema}\n`, 'utf8');