mirror of
https://github.com/wassname/talk.git
synced 2026-07-31 12:50:48 +08:00
Adding ability to query the currently logged in user.
This commit is contained in:
@@ -8,6 +8,9 @@ module.exports = {
|
||||
},
|
||||
settings(_, args, {loaders}) {
|
||||
return loaders.Settings.load();
|
||||
},
|
||||
me(_, args, {req}) {
|
||||
return req.user;
|
||||
}
|
||||
},
|
||||
Mutation: {
|
||||
|
||||
@@ -45,12 +45,14 @@ type Asset {
|
||||
url: String
|
||||
comments: [Comment]
|
||||
settings: Settings!
|
||||
currentUser: User
|
||||
}
|
||||
|
||||
type Query {
|
||||
settings: Settings
|
||||
assets: [Asset]
|
||||
asset(id: ID!): Asset
|
||||
me: User
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
|
||||
Reference in New Issue
Block a user