2017-03-23 16:27:59 +09:00
|
|
|
import Users from "meteor/vulcan:users";
|
2016-11-08 16:33:25 +09:00
|
|
|
|
|
|
|
Users.addField([
|
|
|
|
/**
|
|
|
|
Count of the user's posts
|
|
|
|
*/
|
|
|
|
{
|
2017-01-18 10:18:33 +09:00
|
|
|
fieldName: "postCount",
|
2016-11-08 16:33:25 +09:00
|
|
|
fieldSchema: {
|
|
|
|
type: Number,
|
|
|
|
optional: true,
|
|
|
|
defaultValue: 0,
|
2016-12-06 10:55:47 +01:00
|
|
|
viewableBy: ['guests'],
|
2016-11-08 16:33:25 +09:00
|
|
|
}
|
2017-06-17 15:30:58 +09:00
|
|
|
},
|
|
|
|
/**
|
|
|
|
The user's associated posts (GraphQL only)
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
fieldName: "posts",
|
|
|
|
fieldSchema: {
|
|
|
|
type: Array,
|
|
|
|
optional: true,
|
|
|
|
viewableBy: ['guests'],
|
|
|
|
resolveAs: 'posts: [Post]'
|
|
|
|
}
|
2016-11-08 16:33:25 +09:00
|
|
|
}
|
2017-02-16 08:39:42 +01:00
|
|
|
]);
|