Skip to content

Commit

Permalink
Fix babel initialization for graphql type generation (elastic#33962)
Browse files Browse the repository at this point in the history
This restores the functionality of the graphql type generation scripts after elastic#33093. In particular, it properly sets up the babel import hook so schemata can once more be imported from `.ts/.tsx` files.
  • Loading branch information
weltenwort committed Mar 27, 2019
1 parent cfc92b6 commit 8ec5b11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions x-pack/plugins/infra/scripts/generate_types_from_graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/uptime/scripts/infer_graphql_types.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 8ec5b11

Please sign in to comment.