olragon / graphql_api

GraphQL for Drupal 7
GNU General Public License v2.0
13 stars 3 forks source link

ignore warnings on empty entity properties #6

Closed klokie closed 7 years ago

klokie commented 7 years ago

Hi, I was getting a lot of warnings in the watchdog if the data from getPropertyInfo() for an entity or target_bundles for an entityreference were empty.

Warning: array_values() expects parameter 1 to be array, null given in Drupal\graphql_api\Schema->getFields() (line 584 of …/sites/all/modules/contrib/graphql_api/src/Schema.php).
Warning: Invalid argument supplied for foreach() in Drupal\graphql_api\Schema->getFields() (line 508 of …/sites/all/modules/contrib/graphql_api/src/Schema.php).

Not sure if that's related to https://github.com/olragon/graphql_api/issues/4, but it seems to me that these warnings can be ignored.

olragon commented 7 years ago

Great improvement, thank you