drupal-graphql / graphql

GraphQL integration for Drupal 9/10
287 stars 202 forks source link

Added condition in graphql.install for non empty variable #1344

Open aarohiprasad opened 1 year ago

aarohiprasad commented 1 year ago

Context:

  1. Install Drupal in (standard install profile)
  2. Install graphQL module
  3. Uninstall GraphQL module and see error
    ---- -------------- -------- ---------- -------------------------------------- 
    ID   Date           Type     Severity   Message                               
    ---- -------------- -------- ---------- -------------------------------------- 
    46   04/Jul 15:32   php      Error      TypeError: array_keys(): Argument #1  
                                          ($array) must be of type array, null  
                                          given in array_keys() (line 40 of     
                                          /var/www/html/web/modules/contrib/gr  
                                          aphql/graphql.install).   

This PR adds an 'if' condition in graphql.install to check if language module is correctly enabled

darvanen commented 1 year ago

I also ran into this issue.

kay-o commented 1 week ago

I'm getting the same issue with the following versions installed with Drupal 10.3.6

"drupal/graphql": "4.x-dev@dev",
"drupal/graphql_compose": "^2.1",
"drupal/typed_data": "^1.0@beta",

Applying the changes in the first commit allowed me to uninstall the graphql module.