Skip to content

Commit

Permalink
Merge pull request #387 from jasonbahl/feature/#381-selected-post-ter…
Browse files Browse the repository at this point in the history
…ms-redux

Feature/#381 - Selected Terms in TermObjectConnection queries
  • Loading branch information
CodeProKid committed Feb 8, 2018
2 parents 47ee3b6 + d92db9c commit 5fbaa1c
Show file tree
Hide file tree
Showing 38 changed files with 3,644 additions and 802 deletions.
6 changes: 3 additions & 3 deletions src/Type/Avatar/AvatarType.php
Expand Up @@ -65,7 +65,7 @@ public function __construct() {
*/
private static function fields() {

if ( null === self::$fields ) :
if ( null === self::$fields ) {
self::$fields = function() {
$fields = [
'size' => [
Expand Down Expand Up @@ -109,7 +109,7 @@ private static function fields() {
'foundAvatar' => [
'type' => Types::boolean(),
'description' => __( 'Whether the avatar was successfully found.', 'wp-graphql' ),
'resolve' => function( $avatar, array $args, AppContext $context, ResolveInfo $info ) {
'resolve' => function( $avatar, array $args, AppContext $context, ResolveInfo $info ) {
return ! empty( $avatar['found_avatar'] && true === $avatar['found_avatar'] ) ? true : false;
},
],
Expand All @@ -128,7 +128,7 @@ private static function fields() {
return self::prepare_fields( $fields, self::$type_name );

};
endif;
}

return self::$fields;

Expand Down
6 changes: 3 additions & 3 deletions src/Type/Comment/CommentType.php
Expand Up @@ -59,7 +59,7 @@ public function __construct() {
*/
private static function fields() {

if ( null === self::$fields ) :
if ( null === self::$fields ) {
self::$fields = function() {
$fields = [
'id' => [
Expand Down Expand Up @@ -168,7 +168,7 @@ private static function fields() {
*
* @since 0.0.5
*/
$fields['children'] = CommentConnectionDefinition::connection();
$fields['children'] = CommentConnectionDefinition::connection( 'Children' );

/**
* This prepares the fields by sorting them and applying a filter for adjusting the schema.
Expand All @@ -178,7 +178,7 @@ private static function fields() {
*/
return self::prepare_fields( $fields, self::$type_name );
};
endif;
}

return self::$fields;
}
Expand Down

0 comments on commit 5fbaa1c

Please sign in to comment.