11 lines
420 B
JavaScript
11 lines
420 B
JavaScript
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...');
|