Skip to content

Commit

Permalink
fix(cli-utils): Fix hash parsing in generate-persisted (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
kitten authored Apr 15, 2024
1 parent 585fa14 commit e67b7e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/friendly-buses-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@gql.tada/cli-utils": patch
---

Fix hash parsing in `generate-persisted` command
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async function* _runPersisted(params: PersistedParams): AsyncIterableIterator<Pe

let document = operation;
for (const fragment of fragments) document += '\n\n' + print(fragment);
documents[JSON.parse(hashArg.getFullText())] = document;
documents[hashArg.getText().slice(1, -1)] = document;
}

yield {
Expand Down

0 comments on commit e67b7e3

Please sign in to comment.