react-firebase-starter
react-firebase-starter copied to clipboard
Schema downloading on setup
The code from setup.js, that downloads schema:
//
// Inject "babel-plugin-transform-export-extensions"
// -----------------------------------------------------------------------------
file = path.resolve('./node_modules/babel-preset-react-app/index.js');
text = fs.readFileSync(file, 'utf8');
if (!text.includes('babel-plugin-transform-export-extensions')) {
if (text.includes('const plugins = [')) {
text = text.replace(
'const plugins = [',
"const plugins = [\n require.resolve('babel-plugin-transform-export-extensions'),"); // prettier-ignore
fs.writeFileSync(file, text, 'utf8');
} else {
throw new Error(`Failed to inject babel-plugin-transform-export-extensions in ${file}.`); // prettier-ignore
}
}
will not be working with the usual GraphQL API. Can we replace it with https://github.com/graphcool/graphql-cli (graphql get-schema) ? It requests schema directly from GrapgQL server.