Download spectrum/api/queries/user/threadCount.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 258 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/queries/user/threadCount.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/api/queries/user/threadCount.js
-
curl -L -o threadCount.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/queries/user/threadCount.js
258 Bytes
| // @flow | |
| import type { GraphQLContext } from '../../'; | |
| import type { DBUser } from 'shared/types'; | |
| export default ({ id }: DBUser, _: any, { loaders }: GraphQLContext) => { | |
| return loaders.userThreadCount.load(id).then(data => (data ? data.count : 0)); | |
| }; | |