Skip to content

Commit 52c1cb9

Browse files
authored
Merge pull request #24 from drupal-graphql/refactor-range-parameters
Issue #20 Renaming start and end to offset and limit to be consistent with the …
2 parents dece375 + 40a70d1 commit 52c1cb9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Plugin/GraphQL/Fields/SearchAPISearch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ private function prepareSearchQuery($args) {
307307
}
308308
// Adding range parameters to the query (e.g for pagination).
309309
if ($args['range']) {
310-
$this->query->range($args['range']['start'], $args['range']['end']);
310+
$this->query->range($args['range']['offset'], $args['range']['limit']);
311311
}
312312
// Adding sort parameters to the query.
313313
if ($args['sort']) {

src/Plugin/GraphQL/InputTypes/RangeInput.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
* id = "rangeInput",
1212
* name = "RangeInput",
1313
* fields = {
14-
* "start" = "Int!",
15-
* "end" = "Int!"
14+
* "offset" = "Int!",
15+
* "limit" = "Int!"
1616
* }
1717
* )
1818
*/

0 commit comments

Comments
 (0)