Skip to content

Commit

Permalink
Tweak error message
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jun 11, 2024
1 parent 9caaa54 commit 9c57a06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/__tests__/masking.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ test("throws when document contains more than 1 fragment without a fragmentName"
)
).toThrow(
new InvariantError(
"Found 2 fragments. `fragmentName` must be provided when there is more than 1 fragment."
"Found 2 fragments. `fragmentName` must be provided when there is not exactly 1 fragment."
)
);
});
Expand Down
2 changes: 1 addition & 1 deletion src/core/masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function maskFragment<TData = unknown>(
if (typeof fragmentName === "undefined") {
invariant(
fragments.length === 1,
`Found %s fragments. \`fragmentName\` must be provided when there is more than 1 fragment.`,
`Found %s fragments. \`fragmentName\` must be provided when there is not exactly 1 fragment.`,
fragments.length
);
fragmentName = fragments[0].name.value;
Expand Down

0 comments on commit 9c57a06

Please sign in to comment.