Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,5 +263,26 @@ function op_action_register_types()
'description' => 'Paginate users with offsets',
]
);

// Add offsetPagination argument to the products connection (ProductUnion)
register_graphql_field(
'RootQueryToProductUnionConnectionWhereArgs',
'offsetPagination',
[
'type' => 'OffsetPagination',
'description' => 'Paginate products with offsets',
]
);


// Add offsetPagination metadata to pageInfo for products
register_graphql_field(
'RootQueryToProductUnionConnectionPageInfo',
'offsetPagination',
[
'type' => 'OffsetPaginationPageInfo',
'description' => 'Offset pagination metadata for products',
]
);
}
}