Skip to content

Commit

Permalink
Add indentation back to printed GraphQL documents
Browse files Browse the repository at this point in the history
  • Loading branch information
emmatown committed May 11, 2020
1 parent ef7a2fe commit e0cdba4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/funny-grapes-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ts-gql/compiler": minor
---

Add indentation back to printed GraphQL documents
6 changes: 4 additions & 2 deletions packages/compiler/src/operation-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ declare module "./@schema" {
}
}
export const document = ${JSON.stringify(operation, (key, value) =>
key === "loc" ? undefined : value
export const document = ${JSON.stringify(
operation,
(key, value) => (key === "loc" ? undefined : value),
2
)}
`),
};
Expand Down

0 comments on commit e0cdba4

Please sign in to comment.