Skip to content

Instantly share code, notes, and snippets.

@r3dm1ke
Created February 20, 2020 18:05
Show Gist options
  • Select an option

  • Save r3dm1ke/4f300b20a8767d8481850cbc2fdd97ed to your computer and use it in GitHub Desktop.

Select an option

Save r3dm1ke/4f300b20a8767d8481850cbc2fdd97ed to your computer and use it in GitHub Desktop.
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