Download spectrum/shared/graphql/queries/communityMember/getCommunityMember.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 695 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/graphql/queries/communityMember/getCommunityMember.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/shared/graphql/queries/communityMember/getCommunityMember.js
-
curl -L -o getCommunityMember.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/graphql/queries/communityMember/getCommunityMember.js
695 Bytes
| // @flow | |
| import { graphql } from 'react-apollo'; | |
| import gql from 'graphql-tag'; | |
| import { type CommunityMemberInfoType } from '../../fragments/communityMember/communityMemberInfo'; | |
| export type GetCommunityMemberType = { | |
| ...$Exact<CommunityMemberInfoType>, | |
| }; | |
| export const getCommunityMemberQuery = gql` | |
| query getCommunityMember($userId: ID!, $communityId: ID!) { | |
| communityMember(userId: $userId, communityId: $communityId) { | |
| id | |
| isPending | |
| } | |
| } | |
| `; | |
| const getCommunityMemberOptions = { | |
| options: ({ userId, communityId }) => ({ | |
| variables: { | |
| userId, | |
| communityId, | |
| }, | |
| }), | |
| }; | |
| export default graphql(getCommunityMemberQuery, getCommunityMemberOptions); | |