diff --git a/src/Loader.php b/src/Loader.php index c7dd2d2..43cff26 100644 --- a/src/Loader.php +++ b/src/Loader.php @@ -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', + ] + ); } }