|
@@ -14,12 +14,12 @@ type PageInfo struct {
|
|
|
HasPreviousPage bool `json:"has_previous_page"`
|
|
|
}
|
|
|
|
|
|
-func (pi *PageInfo) SetTotal(nodes ...connection.Cursor) {
|
|
|
+func (pi *PageInfo) SetTotal(nodes []connection.Cursor) {
|
|
|
pi.Total = len(nodes)
|
|
|
- pi.Invalidate(nodes...)
|
|
|
+ pi.Invalidate(nodes)
|
|
|
}
|
|
|
|
|
|
-func (pi *PageInfo) Invalidate(nodes ...connection.Cursor) {
|
|
|
+func (pi *PageInfo) Invalidate(nodes []connection.Cursor) {
|
|
|
l := len(nodes)
|
|
|
if l < 1 {
|
|
|
pi.HasPreviousPage = pi.StartCursor != nil
|