Skip to content

Commit

Permalink
fix(metadata): Filters can not be null
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Aug 24, 2021
1 parent 5a604ab commit 4ff5a59
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Metadata/Resource/DeprecationMetadataTrait.php
Expand Up @@ -67,6 +67,8 @@ public function getKeyValue(string $key, $value)
} elseif (\in_array($key, ['collection_query', 'item_query', 'mutation'], true)) {
trigger_deprecation('api-platform/core', '2.7', 'To specify a GraphQl resolver use "resolver" instead of "mutation", "item_query" or "collection_query".');
$key = 'resolver';
} elseif ('filters' === $key) {
$value = null === $value ? [] : $value;
}

return [$this->camelCaseToSnakeCaseNameConverter->denormalize($key), $value];
Expand Down

0 comments on commit 4ff5a59

Please sign in to comment.