Download spectrum/shared/graphql/queries/message/getMessage.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 642 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/graphql/queries/message/getMessage.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/shared/graphql/queries/message/getMessage.js
-
curl -L -o getMessage.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/graphql/queries/message/getMessage.js
642 Bytes
| // @flow | |
| import { graphql } from 'react-apollo'; | |
| import gql from 'graphql-tag'; | |
| import messageInfoFragment from '../../fragments/message/messageInfo'; | |
| import type { MessageInfoType } from '../../fragments/message/messageInfo'; | |
| export type GetMessageType = { | |
| ...$Exact<MessageInfoType>, | |
| }; | |
| export const getMessageByIdQuery = gql` | |
| query getMessageById($id: ID!) { | |
| message(id: $id) { | |
| ...messageInfo | |
| } | |
| } | |
| ${messageInfoFragment} | |
| `; | |
| const getMessageByIdOptions = { | |
| options: ({ id }) => ({ | |
| variables: { | |
| id, | |
| }, | |
| }), | |
| }; | |
| export const getMessageById = graphql( | |
| getMessageByIdQuery, | |
| getMessageByIdOptions | |
| ); | |