Download spectrum/api/loaders/channel.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 688 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/loaders/channel.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/api/loaders/channel.js
-
curl -L -o channel.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/loaders/channel.js
688 Bytes
| // @flow | |
| import { getChannels, getChannelsThreadCounts } from '../models/channel'; | |
| import { getChannelsSettings } from '../models/channelSettings'; | |
| import createLoader from './create-loader'; | |
| export const __createChannelLoader = createLoader(channels => | |
| getChannels(channels) | |
| ); | |
| export const __createChannelThreadCountLoader = createLoader( | |
| channels => getChannelsThreadCounts(channels), | |
| 'group' | |
| ); | |
| export const __createChannelSettingsLoader = createLoader( | |
| channelIds => getChannelsSettings(channelIds), | |
| key => key.channelId | |
| ); | |
| export default () => { | |
| throw new Error( | |
| '⚠️ Do not import loaders directly, get them from the GraphQL context instead! ⚠️' | |
| ); | |
| }; | |