Download spectrum/api/loaders/thread.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 527 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/loaders/thread.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/api/loaders/thread.js
-
curl -L -o thread.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/loaders/thread.js
527 Bytes
| // @flow | |
| import { getThreads } from '../models/thread'; | |
| import { getParticipantsInThreads } from '../models/usersThreads'; | |
| import createLoader from './create-loader'; | |
| export const __createThreadLoader = createLoader(threads => | |
| getThreads(threads) | |
| ); | |
| export const __createThreadParticipantsLoader = createLoader( | |
| threadIds => getParticipantsInThreads(threadIds), | |
| 'group' | |
| ); | |
| export default () => { | |
| throw new Error( | |
| '⚠️ Do not import loaders directly, get them from the GraphQL context instead! ⚠️' | |
| ); | |
| }; | |