Last active
March 1, 2018 05:47
-
-
Save peterpme/ce289134a78cb7232e0091c0e3949338 to your computer and use it in GitHub Desktop.
User Mutation Clarification - imagine User having 20 keys, 5 of which are non-nullable (email_verified: Boolean!)
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
type User = { | |
id: ID! | |
first_name: String | |
last_name: String | |
email_verified: Boolean! | |
} | |
input UpdateUserInput { | |
first_name: String | |
last_name: String | |
} | |
type UpdateUserPayload { | |
first_name: String | |
last_name: String | |
} | |
type Mutation { | |
// I wish I could do this (despite email_verified) | |
updateUser(input: UpdateUserInput!): User | |
// but I have to do this: | |
updateUser(input: UpdateUserInput!): UpdateUserPayload | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment