Fix babel initialization for graphql type generation (#33962)

This restores the functionality of the graphql type generation scripts after #33093. In particular, it properly sets up the babel import hook so schemata can once more be imported from `.ts/.tsx` files.
This commit is contained in:
Felix Stürmer 2019-03-27 21:34:48 +01:00 committed by GitHub
parent d3e8ee317d
commit 07ad8fdbab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -4,6 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
require('../../../../src/setup_node_env');
const { join, resolve } = require('path');
// eslint-disable-next-line import/no-extraneous-dependencies, import/no-unresolved
const { generate } = require('graphql-code-generator');

View file

@ -4,6 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
require('../../../../src/setup_node_env');
const { resolve } = require('path');
// eslint-disable-next-line import/no-extraneous-dependencies, import/no-unresolved
const { generate } = require('graphql-code-generator');