2023-01-10 18:54:18 +03:00

12 lines
476 B
JavaScript

/* eslint-disable @typescript-eslint/no-var-requires */
const run = require('tools/scripts');
const { URL_CRM_GRAPHQL_DIRECT } = process.env;
const PATH_CRM_GRAPHQL_SCHEMA = './graphql/crm.schema.graphql';
const command1 = ['gql-sdl', URL_CRM_GRAPHQL_DIRECT, '-o', PATH_CRM_GRAPHQL_SCHEMA].join(' ');
run(command1, 'Download GraphQL Schema...');
const command2 = ['graphql-codegen,', '--config', '.graphqlrc.yml'].join(' ');
run(command2, 'Generating TypeScript code...');