Skip to content

Commit d69c964

Browse files
committed
[graphql] SearchBy: has renamed to where.
1 parent 9af3cd6 commit d69c964

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

src/SearchBy/DirectiveTest~full-expected.graphql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ enum SearchByFlag {
134134

135135
"""Relation condition for input Nested."""
136136
input SearchByRelationNested {
137-
"""Has?"""
138-
has: SearchByConditionNested!
137+
"""Conditions for the related objects."""
138+
where: SearchByConditionNested!
139139

140140
"""Equal (`=`)."""
141141
eq: Int

src/SearchBy/Operators/Complex/Relation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
*/
2020
class Relation extends BaseOperator implements ComplexOperator, OperatorNegationable {
2121
public function getName(): string {
22-
return 'has';
22+
return 'where';
2323
}
2424

2525
protected function getDescription(): string {
26-
return 'Has?';
26+
return 'Conditions for the related objects.';
2727
}
2828

2929
/**

src/SearchBy/Operators/Complex/RelationTest.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static function (): EloquentBuilder {
9999
},
100100
'test',
101101
[
102-
'has' => 'yes',
102+
'where' => 'yes',
103103
],
104104
],
105105
'{has: yes, not: yes}' => [
@@ -115,8 +115,8 @@ static function (): EloquentBuilder {
115115
},
116116
'test',
117117
[
118-
'has' => 'yes',
119-
'not' => 'yes',
118+
'where' => 'yes',
119+
'not' => 'yes',
120120
],
121121
],
122122
'{has: {property: {eq: 1}}}' => [
@@ -132,7 +132,7 @@ static function (): EloquentBuilder {
132132
},
133133
'test',
134134
[
135-
'has' => [
135+
'where' => [
136136
'property' => [
137137
'eq' => 123,
138138
],
@@ -152,8 +152,8 @@ static function (): EloquentBuilder {
152152
},
153153
'test',
154154
[
155-
'has' => 'yes',
156-
'eq' => 345,
155+
'where' => 'yes',
156+
'eq' => 345,
157157
],
158158
],
159159
'{has: yes, eq: 1, not: yes}' => [
@@ -169,9 +169,9 @@ static function (): EloquentBuilder {
169169
},
170170
'test',
171171
[
172-
'has' => 'yes',
173-
'not' => 'yes',
174-
'eq' => 345,
172+
'where' => 'yes',
173+
'not' => 'yes',
174+
'eq' => 345,
175175
],
176176
],
177177
'{has: yes, eq: 1, gt: 2}' => [
@@ -183,9 +183,9 @@ static function (): EloquentBuilder {
183183
},
184184
'test',
185185
[
186-
'has' => 'yes',
187-
'eq' => 345,
188-
'gt' => 2,
186+
'where' => 'yes',
187+
'eq' => 345,
188+
'gt' => 2,
189189
],
190190
],
191191
'{has: {property: {eq: 1}}} (own)' => [
@@ -202,7 +202,7 @@ static function (): EloquentBuilder {
202202
},
203203
'a',
204204
[
205-
'has' => [
205+
'where' => [
206206
'property' => [
207207
'eq' => 123,
208208
],

0 commit comments

Comments
 (0)