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

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

No files matched your search

+13 -1
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:[
{