Add support for users with more than 100 gists (#74)

This commit is contained in:
Simon Lecoq
2021-01-23 14:23:14 +01:00
committed by GitHub
parent 7ef8e65951
commit b25c363ed1
3 changed files with 35 additions and 7 deletions

View File

@@ -211,9 +211,21 @@
//Gists query
if (/^query Gists /.test(query)) {
console.debug(`metrics/compute/mocks > mocking graphql api result > Projects`)
return ({
return /after: "MOCKED_CURSOR"/m.test(query) ? ({
user:{
gists:{
edges:[],
nodes:[],
}
}
}) : ({
user:{
gists:{
edges:[
{
cursor:"MOCKED_CURSOR"
},
],
totalCount:faker.random.number(100),
nodes:[
{