wp-graphql-polylang
wp-graphql-polylang copied to clipboard
Use of `graphql_connection_query_args` filter breaks User Role Connections
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()
.