Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
fix #300, #85, #100
Browse files Browse the repository at this point in the history
  • Loading branch information
rsm0128 committed Nov 10, 2021
1 parent 4d62d71 commit 56cd1d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/class-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -689,12 +689,14 @@ protected function register_graphql_field( string $type_name, string $field_name
$post_object = get_post( $post_id );
if ( $post_object instanceof \WP_Post ) {
$post_model = new Post( $post_object );
$relationship[] = $post_model;
if ( 'private' != $post_model->get_visibility() ) {
$relationship[] = $post_model;
}
}
}
}

return isset( $value ) ? $relationship : null;
return empty( $relationship ) ? null : $relationship;

},
];
Expand Down

0 comments on commit 56cd1d3

Please sign in to comment.