Open andyjamesn opened 2 years ago
Hi there! I have the same issue - resulting empty array Did you arrive at any solution?
I have found out that query for RB need authentication with Bearer Token included issue is resolved
You can allow to query reusableBlocks without authentication if you want with this:
<?php
add_filter('graphql_data_is_private', function($is_private, $model_name, $data, $visibility, $owner, $current_user) {
if ('PostObject' === $model_name && 'wp_block' === $data->post_type) {
return false;
}
return $is_private;
}, 10, 6);
?>
I have a reusable block and I am trying to return it's dynamicContent
But it is just returning
I have tried all kinds of combinations and it always returns null
If I query a page where the block is, it works fine.
Am I missing something?