Skip to content

Commit

Permalink
Update minor typos in GraphQL errors (#6853)
Browse files Browse the repository at this point in the history
* Update minor typos in GraphQL errors
  • Loading branch information
lukebennett88 authored Oct 31, 2021
1 parent 7160096 commit 44cbef5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tidy-readers-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/keystone': patch
---

Updated minor typos in GraphQL errors
4 changes: 2 additions & 2 deletions packages/keystone/src/types/schema/graphql-ts-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ const RFC_3339_REGEX =
function parseDate(input: string): Date {
if (!RFC_3339_REGEX.test(input)) {
throw new GraphQLError(
'DateTime scalars must be in the form of a full ISO 8601 date-time stirng'
'DateTime scalars must be in the form of a full ISO 8601 date-time string'
);
}
const parsed = new Date(input);
if (isNaN(parsed.valueOf())) {
throw new GraphQLError(
'DateTime scalars must be in the form of a full ISO 8601 date-time stirng'
'DateTime scalars must be in the form of a full ISO 8601 date-time string'
);
}
return parsed;
Expand Down

0 comments on commit 44cbef5

Please sign in to comment.