wp-graphql-polylang icon indicating copy to clipboard operation
wp-graphql-polylang copied to clipboard

Use of `graphql_connection_query_args` filter breaks User Role Connections

Open justlevine opened this issue 3 years ago • 0 comments

Tl;dr when wp-graphql-polylang is enabled, queries with user.role cause an Internal Server Error. This is due to graphqul_connection_query_args expecting an array, even though UserRoleConnectionResolver returns null.

Details here: (https://github.com/wp-graphql/wp-graphql/issues/2048))

The simple solution is to drop the array type from the $query_args argument in __filter_graphql_connection_args().

justlevine avatar Aug 01 '21 15:08 justlevine