Created
February 20, 2020 18:05
-
-
Save r3dm1ke/4f300b20a8767d8481850cbc2fdd97ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import gql from 'graphql-tag'; | |
| export const SEARCH_FOR_REPOS = gql` | |
| query($search_term: String!) { | |
| search(query: $search_term, type: REPOSITORY, first: 20) { | |
| repositoryCount, | |
| edges { | |
| node { | |
| ... on Repository { | |
| name, | |
| owner { | |
| login | |
| }, | |
| stargazers { | |
| totalCount | |
| }, | |
| descriptionHTML, | |
| } | |
| } | |
| } | |
| } | |
| } | |
| `; | |
| export const GET_REPO_ISSUES = gql` | |
| query($name: String!, $owner: String!) { | |
| repository(name: $name, owner: $owner) { | |
| issues(first: 20, states: [OPEN], orderBy: {field: CREATED_AT, direction: DESC}) { | |
| nodes { | |
| title, | |
| bodyHTML, | |
| createdAt | |
| } | |
| } | |
| } | |
| } | |
| `; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment