Created
October 2, 2019 05:15
-
-
Save ThisIsMissEm/09ece11f1bc77318c845ae8fdbf1147f to your computer and use it in GitHub Desktop.
Form Validation as a Result Union
This file contains hidden or 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