2016-11-26 11:17:01 +09:00
|
|
|
// import gql from 'graphql-tag';
|
2016-11-22 18:14:51 -05:00
|
|
|
|
2016-11-26 11:17:01 +09:00
|
|
|
// const fragments = {
|
2016-11-22 18:14:51 -05:00
|
|
|
|
2016-11-26 11:17:01 +09:00
|
|
|
// list: {
|
|
|
|
// name: 'postsListFragment',
|
|
|
|
// fragment: gql`
|
|
|
|
// fragment postsListFragment on Post {
|
|
|
|
// _id
|
|
|
|
// title
|
|
|
|
// url
|
|
|
|
// slug
|
|
|
|
// postedAt
|
|
|
|
// sticky
|
|
|
|
// status
|
|
|
|
// user {
|
|
|
|
// # ...avatarUserInfo
|
|
|
|
// _id
|
|
|
|
// __displayName
|
|
|
|
// __emailHash
|
|
|
|
// __slug
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// `,
|
|
|
|
// },
|
2016-11-22 18:14:51 -05:00
|
|
|
|
2016-11-26 11:17:01 +09:00
|
|
|
// single: {
|
|
|
|
// name: 'postsSingleFragment',
|
|
|
|
// fragment: gql`
|
|
|
|
// fragment postsSingleFragment on Post {
|
|
|
|
// _id
|
|
|
|
// title
|
|
|
|
// url
|
|
|
|
// body
|
|
|
|
// htmlBody
|
|
|
|
// slug
|
|
|
|
// thumbnailUrl
|
|
|
|
// baseScore
|
|
|
|
// postedAt
|
|
|
|
// sticky
|
|
|
|
// status
|
|
|
|
// categories {
|
|
|
|
// # ...minimumCategoryInfo
|
|
|
|
// _id
|
|
|
|
// name
|
|
|
|
// slug
|
|
|
|
// }
|
|
|
|
// commentCount
|
|
|
|
// commenters {
|
|
|
|
// # ...avatarUserInfo
|
|
|
|
// _id
|
|
|
|
// __displayName
|
|
|
|
// __emailHash
|
|
|
|
// __slug
|
|
|
|
// }
|
|
|
|
// upvoters {
|
|
|
|
// _id
|
|
|
|
// }
|
|
|
|
// downvoters {
|
|
|
|
// _id
|
|
|
|
// }
|
|
|
|
// upvotes # should be asked only for admins?
|
|
|
|
// score # should be asked only for admins?
|
|
|
|
// viewCount # should be asked only for admins?
|
|
|
|
// clickCount # should be asked only for admins?
|
|
|
|
// user {
|
|
|
|
// # ...avatarUserInfo
|
|
|
|
// _id
|
|
|
|
// __displayName
|
|
|
|
// __emailHash
|
|
|
|
// __slug
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// `,
|
|
|
|
// },
|
|
|
|
// };
|
2016-11-22 18:14:51 -05:00
|
|
|
|
2016-11-26 11:17:01 +09:00
|
|
|
// export default fragments;
|