Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.

Commit d50b4da

Browse files
committed
Apply code review suggestion
1 parent 7f42407 commit d50b4da

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/graphql-mini-transforms/src/document.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ export function cleanDocument(
4545
addTypename(definition);
4646
}
4747

48-
const normalizedSource = minifySource(print(document));
48+
const documentSource = print(document);
49+
const normalizedSource = minifySource(documentSource);
4950
const normalizedDocument = parse(normalizedSource);
5051

5152
for (const definition of normalizedDocument.definitions) {
5253
stripLoc(definition);
5354
}
5455

55-
const id = generateId(print(document));
56+
const id = generateId(documentSource);
5657

5758
Reflect.defineProperty(normalizedDocument, 'id', {
5859
value: id,

0 commit comments

Comments
 (0)