@graphql-codegen/cli 2.4.0 → 2.4.1-alpha-5081829d6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin.js +7 -4
- package/index.js +7 -4
- package/index.mjs +7 -4
- package/package.json +1 -1
package/bin.js
CHANGED
|
@@ -978,10 +978,13 @@ async function executeCodegen(input) {
|
|
|
978
978
|
title: 'Load GraphQL documents',
|
|
979
979
|
task: wrapTask(async () => {
|
|
980
980
|
debugLog(`[CLI] Loading Documents`);
|
|
981
|
-
|
|
982
|
-
const
|
|
983
|
-
|
|
984
|
-
|
|
981
|
+
// get different cache for shared docs and output specific docs
|
|
982
|
+
const results = await Promise.all([rootDocuments, outputSpecificDocuments].map(docs => {
|
|
983
|
+
const hash = JSON.stringify(docs);
|
|
984
|
+
return documentsLoadingCache.load(hash);
|
|
985
|
+
}));
|
|
986
|
+
const documents = [];
|
|
987
|
+
results.forEach(source => documents.push(...source.documents));
|
|
985
988
|
if (documents.length > 0) {
|
|
986
989
|
outputDocuments.push(...documents);
|
|
987
990
|
}
|
package/index.js
CHANGED
|
@@ -896,10 +896,13 @@ async function executeCodegen(input) {
|
|
|
896
896
|
title: 'Load GraphQL documents',
|
|
897
897
|
task: wrapTask(async () => {
|
|
898
898
|
debugLog(`[CLI] Loading Documents`);
|
|
899
|
-
|
|
900
|
-
const
|
|
901
|
-
|
|
902
|
-
|
|
899
|
+
// get different cache for shared docs and output specific docs
|
|
900
|
+
const results = await Promise.all([rootDocuments, outputSpecificDocuments].map(docs => {
|
|
901
|
+
const hash = JSON.stringify(docs);
|
|
902
|
+
return documentsLoadingCache.load(hash);
|
|
903
|
+
}));
|
|
904
|
+
const documents = [];
|
|
905
|
+
results.forEach(source => documents.push(...source.documents));
|
|
903
906
|
if (documents.length > 0) {
|
|
904
907
|
outputDocuments.push(...documents);
|
|
905
908
|
}
|
package/index.mjs
CHANGED
|
@@ -869,10 +869,13 @@ async function executeCodegen(input) {
|
|
|
869
869
|
title: 'Load GraphQL documents',
|
|
870
870
|
task: wrapTask(async () => {
|
|
871
871
|
debugLog(`[CLI] Loading Documents`);
|
|
872
|
-
|
|
873
|
-
const
|
|
874
|
-
|
|
875
|
-
|
|
872
|
+
// get different cache for shared docs and output specific docs
|
|
873
|
+
const results = await Promise.all([rootDocuments, outputSpecificDocuments].map(docs => {
|
|
874
|
+
const hash = JSON.stringify(docs);
|
|
875
|
+
return documentsLoadingCache.load(hash);
|
|
876
|
+
}));
|
|
877
|
+
const documents = [];
|
|
878
|
+
results.forEach(source => documents.push(...source.documents));
|
|
876
879
|
if (documents.length > 0) {
|
|
877
880
|
outputDocuments.push(...documents);
|
|
878
881
|
}
|