-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore : Shifting from String to EmailAddress in Graphql Schema (#2986)
* Chore : Shifting from String to EmailAddress in Graphql Schema * Forgot to include a file * CodeRabbit suggestions * coderabbit.ai improvements * coderabbit.ai improvements:2
- Loading branch information
Showing
12 changed files
with
61 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { EmailAddressResolver } from "graphql-scalars"; | ||
import { builder } from "~/src/graphql/builder"; | ||
|
||
/** | ||
* A custom scalar type for validating email addresses according to RFC 5322. | ||
* This ensures that all email fields in the schema are properly validated. | ||
* More information at this link: {@link https://the-guild.dev/graphql/scalars/docs/scalars/email-address} | ||
*/ | ||
export const EmailAddress = builder.addScalarType( | ||
"EmailAddress", | ||
EmailAddressResolver, | ||
); | ||
|
||
/** | ||
* `EmailAddress` scalar type for pothos schema. | ||
* The underscore prefix indicates this is an internal type definition. | ||
* @example | ||
* Valid: user@example.com | ||
* Invalid: user@, user@.com, @example.com | ||
*/ | ||
export type _EmailAddress = { | ||
Input: string; | ||
Output: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.