Does this circuit look right?
type User {
id : ID!
username : String!
email : String!
name : String!
}
input UserInput {
username : String!
email : String!
name : String!
}
mutation createNewUser($usr: UserInput!) {
createUser(user: $usr)
}
As an internal user ID is assigned when you create a user, should be separate typeand inputin this scheme, or user can be done input? So the circuit looks like this:
input User {
id: ID
username : String!
email : String!
name : String!
}
mutation createNewUser($usr: User!) {
createUser(user: $usr) : User
}
source
share