go-mongo/gql/user.gql

26 lines
442 B
GraphQL

type User
@goExtraField(name: "Password", type: "*string")
@goExtraField(name: "Token", type: "*string") {
id: ID!
phone: String
email: String
type: String
status: String
verified: Boolean @goField(forceResolver: true)
}
input CreateUserInput {
email: String
phone: String
status: Status
password: String!
}
extend type Query {
users: [User]
}
extend type Mutation {
createUser(input: CreateUserInput!): User
}