Skip to content

Commit

Permalink
correct pagination args
Browse files Browse the repository at this point in the history
  • Loading branch information
olirice committed Feb 2, 2024
1 parent 742fa7b commit cac258b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 29 deletions.
50 changes: 22 additions & 28 deletions test/expected/page_info.out
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ begin;
graphql.resolve($$
{
accountCollection(
first: 2,
first: 1,
offset: 1,
after: "Wzdd" # id = 7
) {
Expand All @@ -545,33 +545,27 @@ begin;
}
$$)
);
jsonb_pretty
------------------------------------------
{ +
"data": { +
"accountCollection": { +
"edges": [ +
{ +
"node": { +
"id": 9 +
}, +
"cursor": "Wzld" +
}, +
{ +
"node": { +
"id": 10 +
}, +
"cursor": "WzEwXQ=="+
} +
], +
"pageInfo": { +
"endCursor": "WzEwXQ==",+
"hasNextPage": false, +
"startCursor": "Wzld", +
"hasPreviousPage": true +
} +
} +
} +
jsonb_pretty
-----------------------------------------
{ +
"data": { +
"accountCollection": { +
"edges": [ +
{ +
"node": { +
"id": 9 +
}, +
"cursor": "Wzld" +
} +
], +
"pageInfo": { +
"endCursor": "Wzld", +
"hasNextPage": true, +
"startCursor": "Wzld", +
"hasPreviousPage": true+
} +
} +
} +
}
(1 row)

Expand Down
2 changes: 1 addition & 1 deletion test/sql/page_info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ begin;
graphql.resolve($$
{
accountCollection(
first: 2,
first: 1,
offset: 1,
after: "Wzdd" # id = 7
) {
Expand Down

0 comments on commit cac258b

Please sign in to comment.