Download spectrum/shared/graphql/mutations/user/banUser.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 474 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/graphql/mutations/user/banUser.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/shared/graphql/mutations/user/banUser.js
-
curl -L -o banUser.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/graphql/mutations/user/banUser.js
474 Bytes
| // @flow | |
| import { graphql } from 'react-apollo'; | |
| import gql from 'graphql-tag'; | |
| type BanUserInput = { | |
| userId: string, | |
| reason: string, | |
| }; | |
| export const banUserMutation = gql` | |
| mutation banUser($input: BanUserInput!) { | |
| banUser(input: $input) | |
| } | |
| `; | |
| const banUserOptions = { | |
| props: ({ mutate }) => ({ | |
| banUser: input => | |
| mutate({ | |
| variables: { | |
| input, | |
| }, | |
| }), | |
| }), | |
| }; | |
| export default graphql(banUserMutation, banUserOptions); | |