diff --git a/src/graphql-schema.js b/src/graphql-schema.js index 9f6b4fc29..cbeb6bb55 100644 --- a/src/graphql-schema.js +++ b/src/graphql-schema.js @@ -98,11 +98,12 @@ export const resolvers = { const session = driver.session() return session.run( 'MATCH (user:User {email: $userEmail}) ' + - 'RETURN user {.id, .slug, .name, .avatar, .locationId, .about, .email, .password, .role} as user LIMIT 1', { userEmail: email }) + 'RETURN user {.id, .slug, .name, .avatar, .locationName, .about, .email, .password, .role} as user LIMIT 1', { + userEmail: email + }) .then(async (result) => { session.close() const [currentUser] = await result.records.map(function (record) { - console.log(record.get('user')) return record.get('user') }) if (currentUser && await bcrypt.compareSync(password, currentUser.password)) { diff --git a/src/schema.graphql b/src/schema.graphql index 48b3c4302..cdc8aa7a2 100644 --- a/src/schema.graphql +++ b/src/schema.graphql @@ -13,7 +13,7 @@ type LoggedInUser { avatar:String! email: String! role: String! - locationId: String + locationName: String about: String token: String! }