valu-digital / wp-graphql-offset-pagination

Adds traditional offset pagination support to WPGraphQL
73 stars 17 forks source link

Error: op_filter_graphql_connection_query_args() must be of the type array, null given #8

Open yossisp opened 3 years ago

yossisp commented 3 years ago

I'm using wp-graphql plugin version 1.0.5, wordpress version 5.7 and the latest version of this plugin (stable branch). When performing this query:

query roles {
  users {
    nodes {
      roles {
        nodes {
          name
        }
      }
    }
  }
}

I receive the following error:

Argument 1 passed to WPGraphQL\\Extensions\\OffsetPagination\\Loader::op_filter_graphql_connection_query_args() must be of the type array, null given, called in /var/www/mysite.com/wp-includes/class-wp-hook.php on line 286

The error happens whenever I query for roles. If I deactivate the plugin the error doesn't happen. Has anyone come across this issue?

yondifon commented 3 years ago

I had this same issue.

JoshuaJarman commented 3 years ago

this might be related to my error of adding enqueuedScripts or enqueuedStylesheets to any post or page query as the error retuned is also about args of type array and being null.

_Argument 1 passed to WPGraphQL\Extensions\OffsetPagination\Loader::op_filter_graphql_connection_queryargs() must be of the type array, null given