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

Sync changes in master with develop #391

Merged
merged 7 commits into from
Jul 22, 2024
Next Next commit
Replace deprecated function DataSource::resolve_post_object
rodrigo-arias authored and josephfusco committed Jul 22, 2024
commit 242cd7dd3903a34b8c0d0c2db1ac09918143138c
2 changes: 1 addition & 1 deletion src/class-config.php
Original file line number Diff line number Diff line change
@@ -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;