Download spectrum/shared/graphql/queries/user/getUserGithubProfile.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 630 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/graphql/queries/user/getUserGithubProfile.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/shared/graphql/queries/user/getUserGithubProfile.js
-
curl -L -o getUserGithubProfile.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/graphql/queries/user/getUserGithubProfile.js
630 Bytes
| // @flow | |
| import { graphql } from 'react-apollo'; | |
| import gql from 'graphql-tag'; | |
| type Profile = { | |
| id: string, | |
| username: string, | |
| }; | |
| export type GetUserGithbProfileType = { | |
| id: string, | |
| username: string, | |
| githubProfile: ?Profile, | |
| }; | |
| export const getUserGithubProfileQuery = gql` | |
| query getUserGithubProfile($id: ID) { | |
| user(id: $id) { | |
| id | |
| username | |
| githubProfile { | |
| id | |
| username | |
| } | |
| } | |
| } | |
| `; | |
| const getUserGithubProfileOptions = { | |
| options: ({ id }) => ({ | |
| variables: { | |
| id, | |
| }, | |
| }), | |
| }; | |
| export default graphql(getUserGithubProfileQuery, getUserGithubProfileOptions); | |