revert generateIntrospectionResult.json

This commit is contained in:
immber
2018-11-28 13:58:56 -08:00
parent cce464b82a
commit 5ae293af89
+3 -9
View File
@@ -112,14 +112,10 @@ const generateIntrospectionResult = async (resultLocation, options = {}) => {
return;
}
const result = await graphql(schema, getIntrospectionQuery(options));
const { data } = await graphql(schema, getIntrospectionQuery(options));
// Serialize the introspection result as JSON.
const introspectionResult = JSON.stringify(
options.raw ? result : result.data,
null,
2
);
const introspectionResult = JSON.stringify(data, null, 2);
// Write the introspection result to the filesystem.
fs.writeFileSync(resultLocation, introspectionResult, 'utf8');
@@ -149,9 +145,7 @@ Promise.all([
generateIntrospectionResult(graphIntrospectionFilename, {
descriptions: false,
}),
generateIntrospectionResult(docsIntrospectionFilename, {
raw: true,
}),
generateIntrospectionResult(docsIntrospectionFilename),
]).catch(err => {
console.error(err);
process.exit(1);