diff --git a/.changeset/funny-grapes-burn.md b/.changeset/funny-grapes-burn.md new file mode 100644 index 0000000..4dd42ea --- /dev/null +++ b/.changeset/funny-grapes-burn.md @@ -0,0 +1,5 @@ +--- +"@ts-gql/compiler": minor +--- + +Add indentation back to printed GraphQL documents diff --git a/packages/compiler/src/operation-types.ts b/packages/compiler/src/operation-types.ts index 957de92..f9a1657 100644 --- a/packages/compiler/src/operation-types.ts +++ b/packages/compiler/src/operation-types.ts @@ -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 )} `), };