How could write a custom mutation resolver?

How could I write a custom mutation resolver, for a "Login", comparing a password with bcrypt with the query password.
I have seen several ways but I would like to know which is the best.
Some in the resolver put the cypher query and in others the cypher query put it in the mutation schema.

Login: async (object, { email, password }, context, resolveInfo) => {
   const user = await neo4jgraphql(
        { email, password },
} ....

Login(email: String!, password: String!): String
      statement: "MATCH (u:User { email: $email, password: $password }) WITH { email:, userId: u.userId, password: u.password } as LoginInfo RETURN LoginInfo"


Login: async (_, { email, password }, { driver, req, user }) => { 
   const session = driver.session() ......

Login(email: String!, password: String!): String!