Skip to content

Commit

Permalink
Replace DateQueryInput with strings for the dateQuery before and afte…
Browse files Browse the repository at this point in the history
…r fields so that strtotime()-compatible strings can be passed in
  • Loading branch information
kellenmace committed Apr 14, 2020
1 parent e3fa876 commit e692197
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 34 deletions.
2 changes: 0 additions & 2 deletions src/Registry/TypeRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
use WPGraphQL\Type\Enum\TimezoneEnum;
use WPGraphQL\Type\Enum\UserRoleEnum;
use WPGraphQL\Type\Enum\UsersConnectionSearchColumnEnum;
use WPGraphQL\Type\Input\DateInput;
use WPGraphQL\Type\Input\DateQueryInput;
use WPGraphQL\Type\Input\MenuItemsConnectionWhereArgs;
use WPGraphQL\Type\Input\PostObjectsConnectionOrderbyInput;
Expand Down Expand Up @@ -260,7 +259,6 @@ public function init_type_registry( TypeRegistry $type_registry ) {
UsersConnectionOrderbyEnum::register_type();
UsersConnectionSearchColumnEnum::register_type();

DateInput::register_type();
DateQueryInput::register_type();
MenuItemsConnectionWhereArgs::register_type();
PostObjectsConnectionOrderbyInput::register_type();
Expand Down
28 changes: 0 additions & 28 deletions src/Type/Input/DateInput.php

This file was deleted.

8 changes: 4 additions & 4 deletions src/Type/Input/DateQueryInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ public static function register_type() {
'description' => __( 'Second (0 to 59)', 'wp-graphql' ),
],
'after' => [
'type' => 'DateInput',
'description' => __( 'Nodes should be returned after this date', 'wp-graphql' ),
'type' => 'String',
'description' => __( 'Nodes should be returned after this date. An ISO 8601 formatted date, such as "2025-03-29T10:05:45-06:00" is preferred. Alternatively, other English date formats that can be parsed by PHP\'s strtotime() function may be used.', 'wp-graphql' ),
],
'before' => [
'type' => 'DateInput',
'description' => __( 'Nodes should be returned before this date', 'wp-graphql' ),
'type' => 'String',
'description' => __( 'Nodes should be returned before this date. An ISO 8601 formatted date, such as "2025-03-29T10:05:45-06:00" is preferred. Alternatively, other English date formats that can be parsed by PHP\'s strtotime() function may be used.', 'wp-graphql' ),
],
'inclusive' => [
'type' => 'Boolean',
Expand Down

0 comments on commit e692197

Please sign in to comment.