I'm following official Lighthouse documentation on how to setup GraphQl into my project. Unfortunately, I'm stacked with the following error:
No directive found for `bcrypt`
Following schema I have created so far:
type Query {
users: [User!]! @paginate(defaultCount: 10)
user(id: ID @eq): User @find
}
type User {
id: ID!
name: String!
email: String!
created_at: DateTime!
updated_at: DateTime!
}
type Mutation {
createUser(
name: String!,
email: String! @rules(apply: ["email", "unique:users"])
password: String! @bcrypt
): User @create
}
The query I'm trying to execute is following:
mutation {
createUser(
name:"John Doe"
email:"john@test.com"
password: "somesupersecret"
) {
id
email
}
}