mirror of
https://github.com/wassname/talk.git
synced 2026-08-13 12:40:11 +08:00
revert generateIntrospectionResult.json
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user