2016-11-08 16:33:25 +09:00
|
|
|
import Telescope from 'meteor/nova:lib';
|
|
|
|
import Users from './collection.js';
|
|
|
|
|
|
|
|
Telescope.graphQL.addQuery(`
|
|
|
|
users: [User]
|
|
|
|
user(_id: String, slug: String): User
|
|
|
|
currentUser: User
|
|
|
|
`);
|
|
|
|
|
|
|
|
Users.graphQLQueries = {
|
|
|
|
single: `
|
|
|
|
_id
|
|
|
|
username
|
|
|
|
createdAt
|
|
|
|
isAdmin
|
2016-11-10 14:22:47 +01:00
|
|
|
__bio
|
|
|
|
__commentCount
|
|
|
|
__displayName
|
|
|
|
__downvotedComments {
|
2016-11-08 18:22:17 +01:00
|
|
|
itemId
|
|
|
|
power
|
|
|
|
votedAt
|
2016-11-08 16:33:25 +09:00
|
|
|
}
|
2016-11-10 14:22:47 +01:00
|
|
|
__downvotedPosts {
|
2016-11-08 18:22:17 +01:00
|
|
|
itemId
|
|
|
|
power
|
|
|
|
votedAt
|
|
|
|
}
|
2016-11-10 14:22:47 +01:00
|
|
|
__email
|
|
|
|
__emailHash
|
|
|
|
__htmlBio
|
|
|
|
__karma
|
|
|
|
__postCount
|
|
|
|
__slug
|
|
|
|
__twitterUsername
|
|
|
|
__upvotedComments {
|
2016-11-08 18:22:17 +01:00
|
|
|
itemId
|
|
|
|
power
|
|
|
|
votedAt
|
|
|
|
}
|
2016-11-10 14:22:47 +01:00
|
|
|
__upvotedPosts {
|
2016-11-08 18:22:17 +01:00
|
|
|
itemId
|
|
|
|
power
|
|
|
|
votedAt
|
|
|
|
}
|
2016-11-10 14:22:47 +01:00
|
|
|
__website
|
|
|
|
__groups
|
|
|
|
__notifications_users
|
|
|
|
__notifications_posts
|
|
|
|
__newsletter_subscribeToNewsletter
|
2016-11-08 16:33:25 +09:00
|
|
|
`
|
|
|
|
};
|