Skip to content

Instantly share code, notes, and snippets.

@mxvanzant
Created July 6, 2020 18:03
Show Gist options
  • Save mxvanzant/5d4e06d1a327e7059e1ff9c3d3b7d06f to your computer and use it in GitHub Desktop.
Save mxvanzant/5d4e06d1a327e7059e1ff9c3d3b7d06f to your computer and use it in GitHub Desktop.
GraphQL
type RootMutation {
registerUser(input: RegisterUserInput!): RegisteredUserResponse
}
type RegisterUserInput {
name: String!
email: Email! // maybe have an Email type defined?
password: String!
}
type RegisteredUserResponse {
id: ID
name: String
email: Email
createAt: TimestampUTC
}
type Email {
text: String!
}
type TimestampUTC {
year: Int
month: Int
day: Int
hour: Int
minute: Int
second: Int
}
type ID {
?
}
type User {
id: ID!
email: Email!
name: Name!
passwordHash: String!
createdAt: TimestampUTC!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment