-
-
Save ianrodrigues/1010f075ddb911053fb3063e426f69e1 to your computer and use it in GitHub Desktop.
Form Validation as a Result Union
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
mutation updateUser( | |
details: UpdateUserInput! | |
): UpdateUserResult | |
union UpdateUserResult = | |
UpdateUserSuccess | | |
FormValidationError | |
type UpdateUserSuccess {} | |
type FormValidationError { | |
errors: [FieldValidationError!]! | |
} | |
type FieldValidationError { | |
field: String! | |
code: String! | |
message: String! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment