Skip to content

Instantly share code, notes, and snippets.

@ma2gedev
Last active May 30, 2021 16:08
Show Gist options
  • Select an option

  • Save ma2gedev/cf5253da7dba27bb46f6df7b8a2032b2 to your computer and use it in GitHub Desktop.

Select an option

Save ma2gedev/cf5253da7dba27bb46f6df7b8a2032b2 to your computer and use it in GitHub Desktop.

Revisions

  1. ma2gedev revised this gist Sep 2, 2018. 1 changed file with 15 additions and 13 deletions.
    28 changes: 15 additions & 13 deletions graphql-github-query-examples.md
    Original file line number Diff line number Diff line change
    @@ -26,20 +26,22 @@ query {
    ```

    ```
    repository(owner: "ma2gedev", name: "power_assert_ex") {
    id
    name
    issues(first:2) {
    totalCount
    nodes {
    title
    query {
    repository(owner: "ma2gedev", name: "power_assert_ex") {
    id
    name
    issues(first:2) {
    totalCount
    nodes {
    title
    }
    }
    description
    createdAt
    codeOfConduct {
    body
    url
    }
    }
    description
    createdAt
    codeOfConduct {
    body
    url
    }
    }
    ```
  2. ma2gedev revised this gist Aug 31, 2018. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion graphql-github-query-examples.md
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,12 @@
    ```
    query {
    viewer {
    login
    }
    }
    ```

    ```
    query {
    viewer {
    login
    @@ -20,7 +23,9 @@ query {
    }
    }
    }
    ```

    ```
    repository(owner: "ma2gedev", name: "power_assert_ex") {
    id
    name
    @@ -37,7 +42,9 @@ repository(owner: "ma2gedev", name: "power_assert_ex") {
    url
    }
    }
    ```

    ```
    mutation {
    addStar(input:{
    starrableId: "MDEwOlJlcG9zaXRvcnk0MzQzODc4NA=="
    @@ -50,4 +57,5 @@ mutation {
    }
    }
    }
    }
    }
    ```
  3. ma2gedev created this gist Aug 31, 2018.
    53 changes: 53 additions & 0 deletions graphql-github-query-examples.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,53 @@
    query {
    viewer {
    login
    }
    }

    query {
    viewer {
    login
    bioHTML
    avatarUrl(size: 2)
    commitComments(first: 1) {
    edges {
    cursor
    }
    nodes {
    body
    }
    totalCount
    }
    }
    }

    repository(owner: "ma2gedev", name: "power_assert_ex") {
    id
    name
    issues(first:2) {
    totalCount
    nodes {
    title
    }
    }
    description
    createdAt
    codeOfConduct {
    body
    url
    }
    }

    mutation {
    addStar(input:{
    starrableId: "MDEwOlJlcG9zaXRvcnk0MzQzODc4NA=="
    }){
    starrable {
    stargazers(first: 3) {
    nodes{
    name
    }
    }
    }
    }
    }