Download spectrum/shared/graphql/queries/community/getCommunityChannelConnection.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/graphql/queries/community/getCommunityChannelConnection.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/shared/graphql/queries/community/getCommunityChannelConnection.js
-
curl -L -o getCommunityChannelConnection.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/graphql/queries/community/getCommunityChannelConnection.js
1.11 kB
| // @flow | |
| import gql from 'graphql-tag'; | |
| import { graphql } from 'react-apollo'; | |
| import communityInfoFragment from '../../fragments/community/communityInfo'; | |
| import type { CommunityInfoType } from '../../fragments/community/communityInfo'; | |
| import communityChannelConnectionFragment from '../../fragments/community/communityChannelConnection'; | |
| import type { CommunityChannelConnectionType } from '../../fragments/community/communityChannelConnection'; | |
| export type GetCommunityChannelConnectionType = { | |
| ...$Exact<CommunityInfoType>, | |
| ...$Exact<CommunityChannelConnectionType>, | |
| }; | |
| export const getCommunityChannelConnectionQuery = gql` | |
| query getCommunityChannels($id: ID) { | |
| community(id: $id) { | |
| ...communityInfo | |
| ...communityChannelConnection | |
| } | |
| } | |
| ${communityInfoFragment} | |
| ${communityChannelConnectionFragment} | |
| `; | |
| const getCommunityChannelConnectionOptions = { | |
| options: ({ id }: { id: string }) => ({ | |
| variables: { | |
| id, | |
| }, | |
| fetchPolicy: 'cache-first', | |
| }), | |
| }; | |
| export default graphql( | |
| getCommunityChannelConnectionQuery, | |
| getCommunityChannelConnectionOptions | |
| ); | |