You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/filter-query.php
+52-28Lines changed: 52 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,9 @@
7
7
8
8
namespaceWPGraphQLFilterQuery;
9
9
10
+
useGraphQL\Type\Definition\ResolveInfo;
11
+
useWPGraphQL\AppContext;
12
+
10
13
/**
11
14
* Main class.
12
15
*/
@@ -152,11 +155,11 @@ public function extend_wp_graphql_fields() {
152
155
[
153
156
'description' => __( 'String Field Match Arguments', 'wp-graphql-filter-query' ),
154
157
'fields' => [
155
-
'in' => [
158
+
'in'=> [
156
159
'type' => [ 'list_of' => 'String' ],
157
160
'description' => __( 'For This To Be Truthy, At Least One Item Of The String Array Arg Passed Here Must Be Contained Within The Calling Taxonomy Field, By Way Of Predefined Aggregates', 'wp-graphql-filter-query' ),
158
161
],
159
-
'notIn' => [
162
+
'notIn'=> [
160
163
'type' => [ 'list_of' => 'String' ],
161
164
'description' => __( 'For This To Be Truthy, Not One Item Of The String Array Arg Passed Here Can Be Contained Within The Calling Taxonomy Field, By Way Of Predefined Aggregates', 'wp-graphql-filter-query' ),
162
165
],
@@ -168,11 +171,11 @@ public function extend_wp_graphql_fields() {
168
171
'type' => 'String',
169
172
'description' => __( 'For This To Be Truthy, The Arg Passed Here Must Not Relate To The Calling Taxonomy Field, By Way Of Predefined Aggregates', 'wp-graphql-filter-query' ),
170
173
],
171
-
'eq' => [
174
+
'eq'=> [
172
175
'type' => 'String',
173
176
'description' => __( 'For This To Be Truthy, The Arg Passed Here Must Be An Exact Match To The Calling Taxonomy Field, By Way Of Predefined Aggregates', 'wp-graphql-filter-query' ),
174
177
],
175
-
'notEq' => [
178
+
'notEq'=> [
176
179
'type' => 'String',
177
180
'description' => __( 'For This To Be Truthy, The Arg Passed Here Must Not Match To The Calling Taxonomy Field, By Way Of Predefined Aggregates', 'wp-graphql-filter-query' ),
178
181
],
@@ -185,11 +188,11 @@ public function extend_wp_graphql_fields() {
185
188
[
186
189
'description' => __( 'Integer Field Match Arguments', 'wp-graphql-filter-query' ),
187
190
'fields' => [
188
-
'in' => [
191
+
'in'=> [
189
192
'type' => [ 'list_of' => 'Integer' ],
190
193
'description' => __( 'For This To Be Truthy, At Least One Item Of The String Array Arg Passed Here Must Be Contained Within The Calling Taxonomy Field, By Way Of Predefined Aggregates', 'wp-graphql-filter-query' ),
191
194
],
192
-
'notIn' => [
195
+
'notIn'=> [
193
196
'type' => [ 'list_of' => 'Integer' ],
194
197
'description' => __( 'For This To Be Truthy, Not One Item Of The String Array Arg Passed Here Can Be Contained Within The Calling Taxonomy Field, By Way Of Predefined Aggregates', 'wp-graphql-filter-query' ),
195
198
],
@@ -201,11 +204,11 @@ public function extend_wp_graphql_fields() {
201
204
'type' => 'Integer',
202
205
'description' => __( 'For This To Be Truthy, The Arg Passed Here Must Not Relate To The Calling Taxonomy Field, By Way Of Predefined Aggregates', 'wp-graphql-filter-query' ),
203
206
],
204
-
'eq' => [
207
+
'eq'=> [
205
208
'type' => 'Integer',
206
209
'description' => __( 'For This To Be Truthy, The Arg Passed Here Must Be An Exact Match To The Calling Taxonomy Field, By Way Of Predefined Aggregates', 'wp-graphql-filter-query' ),
207
210
],
208
-
'notEq' => [
211
+
'notEq'=> [
209
212
'type' => 'Integer',
210
213
'description' => __( 'For This To Be Truthy, The Arg Passed Here Must Not Match To The Calling Taxonomy Field, By Way Of Predefined Aggregates', 'wp-graphql-filter-query' ),
211
214
],
@@ -270,8 +273,18 @@ public function extend_wp_graphql_fields() {
270
273
);
271
274
}
272
275
276
+
/**
277
+
* Apply facet filters using graphql_post_object_connection_query_args filter hook.
278
+
*
279
+
* @param array $query_args arguments that come from previous filter and will be passed to WP_Query.
0 commit comments