Skip to content

Commit 029ee3c

Browse files
authored
chore: deprecated filter
Fix the deprecation warning of `graphql_data_loaders` filter. Warning: > The graphql_data_loaders filter is deprecated and will be removed in a future version. Instead, use the graphql_data_loader_classes filter to add/change data loader classes before they are instantiated. https://github.com/wp-graphql/wp-graphql/blob/131659f1a6118dcf429480002d979c4016440c20/src/AppContext.php#L196-L209
1 parent c589bfa commit 029ee3c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/WPGraphQLAcf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function init(): void {
4646

4747
add_filter( 'graphql_resolve_revision_meta_from_parent', [ $this, 'preview_support' ], 10, 4 );
4848

49-
add_filter( 'graphql_data_loaders', [ $this, 'register_loaders' ], 10, 2 );
49+
add_filter( 'graphql_data_loader_classes', [ $this, 'register_loaders' ], 10, 2 );
5050
add_filter( 'graphql_resolve_node_type', [ $this, 'resolve_acf_options_page_node' ], 10, 2 );
5151
/**
5252
* This filters any field that returns the `ContentTemplate` type

0 commit comments

Comments
 (0)