Download spectrum/shared/graphql/queries/channel/getChannelSettings.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 796 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/graphql/queries/channel/getChannelSettings.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/shared/graphql/queries/channel/getChannelSettings.js
-
curl -L -o getChannelSettings.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/graphql/queries/channel/getChannelSettings.js
796 Bytes
| // @flow | |
| import { graphql } from 'react-apollo'; | |
| import gql from 'graphql-tag'; | |
| import channelInfoFragment, { | |
| type ChannelInfoType, | |
| } from '../../fragments/channel/channelInfo'; | |
| export type GetChannelSettingsType = { | |
| ...$Exact<ChannelInfoType>, | |
| joinSettings: { | |
| tokenJoinEnabled: boolean, | |
| token: string, | |
| }, | |
| }; | |
| export const getChannelSettingsByIdQuery = gql` | |
| query getChannelSettings($id: ID) { | |
| channel(id: $id) { | |
| ...channelInfo | |
| joinSettings { | |
| tokenJoinEnabled | |
| token | |
| } | |
| } | |
| } | |
| ${channelInfoFragment} | |
| `; | |
| const getChannelSettingsByIdOptions = { | |
| options: ({ id }) => ({ | |
| variables: { | |
| id, | |
| }, | |
| fetchPolicy: 'cache-first', | |
| }), | |
| }; | |
| export default graphql( | |
| getChannelSettingsByIdQuery, | |
| getChannelSettingsByIdOptions | |
| ); | |