Download spectrum/shared/graphql/fragments/thread/threadInfo.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 2.35 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/graphql/fragments/thread/threadInfo.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/shared/graphql/fragments/thread/threadInfo.js
-
curl -L -o threadInfo.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/graphql/fragments/thread/threadInfo.js
2.35 kB
| // @flow | |
| import gql from 'graphql-tag'; | |
| import userInfoFragment from '../user/userInfo'; | |
| import communityInfoFragment from '../community/communityInfo'; | |
| import type { CommunityInfoType } from '../community/communityInfo'; | |
| import communityMetaDataFragment from '../community/communityMetaData'; | |
| import type { CommunityMetaDataType } from '../community/communityMetaData'; | |
| import threadParticipantFragment from './threadParticipant'; | |
| import channelInfoFragment from '../channel/channelInfo'; | |
| import type { ChannelInfoType } from '../channel/channelInfo'; | |
| import type { ThreadMessageConnectionType } from 'shared/graphql/fragments/thread/threadMessageConnection'; | |
| import type { ThreadParticipantType } from './threadParticipant'; | |
| type Attachment = { | |
| attachmentType: string, | |
| data: string, | |
| trueUrl: string, | |
| }; | |
| export type ThreadInfoType = { | |
| id: string, | |
| messageCount: number, | |
| createdAt: string, | |
| modifiedAt: ?string, | |
| lastActive: ?string, | |
| editedBy?: { | |
| ...$Exact<ThreadParticipantType>, | |
| }, | |
| author: { | |
| ...$Exact<ThreadParticipantType>, | |
| }, | |
| channel: { | |
| ...$Exact<ChannelInfoType>, | |
| }, | |
| community: { | |
| ...$Exact<CommunityInfoType>, | |
| ...$Exact<CommunityMetaDataType>, | |
| }, | |
| // $FlowFixMe: We need to remove `messageConnection` from ThreadMessageConnectionType. This works in the meantime. | |
| ...$Exact<ThreadMessageConnectionType>, | |
| isPublished: boolean, | |
| isLocked: boolean, | |
| isAuthor: boolean, | |
| type: string, | |
| content: { | |
| title: string, | |
| body: string, | |
| }, | |
| attachments: Array<?Attachment>, | |
| watercooler: boolean, | |
| metaImage: string, | |
| reactions: { | |
| count: number, | |
| hasReacted: boolean, | |
| }, | |
| }; | |
| export default gql` | |
| fragment threadInfo on Thread { | |
| id | |
| messageCount | |
| createdAt | |
| modifiedAt | |
| lastActive | |
| editedBy { | |
| ...threadParticipant | |
| } | |
| author { | |
| ...threadParticipant | |
| } | |
| channel { | |
| ...channelInfo | |
| } | |
| community { | |
| ...communityInfo | |
| ...communityMetaData | |
| } | |
| isPublished | |
| isLocked | |
| isAuthor | |
| type | |
| content { | |
| title | |
| body | |
| } | |
| attachments { | |
| attachmentType | |
| data | |
| } | |
| watercooler | |
| metaImage | |
| reactions { | |
| count | |
| hasReacted | |
| } | |
| } | |
| ${threadParticipantFragment} | |
| ${userInfoFragment} | |
| ${channelInfoFragment} | |
| ${communityInfoFragment} | |
| ${communityMetaDataFragment} | |
| `; | |