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

Commit

Permalink
Merge pull request #347 from rodrigo-arias/bug/resolve-post-object
Browse files Browse the repository at this point in the history
Replace deprecated function DataSource::resolve_post_object
  • Loading branch information
jasonbahl authored Dec 12, 2022
2 parents 7a27116 + e88b060 commit 05636ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/class-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ protected function register_graphql_field( string $type_name, string $field_name
'resolve' => function( $root, $args, $context, $info ) use ( $acf_field ) {
$value = $this->get_acf_field_value( $root, $acf_field );

return DataSource::resolve_post_object( (int) $value, $context );
return $context->get_loader( 'post' )->load_deferred( (int) $value );
},
];
break;
Expand Down

0 comments on commit 05636ef

Please sign in to comment.