Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 1

Able to circumvent pagination when calling same field twice (with different query) using GraphQL API

When I use the following query I am asked to perform pagination (as expected) -

query {
  user(login:"armsp"){
    repositories{
      nodes{
        name
        issues(states: OPEN){
          totalCount
        }
      }
    }    
  }
}

However when I do the following I actually get all the results which doesn't make any sense to me -

 

query {
  user(login:"armsp"){
    repositories{
      totalCount
    }
    repositories{
      nodes{
        name
        issues(states: OPEN){
          totalCount
        }
      }
    }   
  }
}

Shouldn't I be asked for pagination in this query too ?

Now I have very few repos. If I run the same thing on lets say 'microsoft' then I see only 100 repos -

 

query {
  organization(login:"microsoft"){
    repositories{
      totalCount
    }
    repositories{
      nodes{
        name
        issues(states: OPEN){
          totalCount
        }
      }
    }   
  }
}

Q1) Is the number 100 a design decision?

Q2) Is it a good idea to query like this?

Q3) Should I just use pagination even if the nodes are less than 100 ? 

 

I have posted this on SO too. Just wanted a clearer picture of what is going on here.