Download spectrum/api/queries/message/parent.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 269 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/queries/message/parent.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/api/queries/message/parent.js
-
curl -L -o parent.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/queries/message/parent.js
269 Bytes
| // @flow | |
| import type { DBMessage } from 'shared/types'; | |
| import type { GraphQLContext } from '../../'; | |
| export default ( | |
| { parentId }: DBMessage, | |
| _: void, | |
| { loaders }: GraphQLContext | |
| ) => { | |
| if (!parentId) return null; | |
| return loaders.message.load(parentId); | |
| }; | |