You are here

protected function EntityQuery::isNullOperator in GraphQL 8.3

Checks if an operator is a null operator.

Parameters

string $operator: The query operator to check against.

Return value

bool TRUE if the given operator is a null operator, FALSE otherwise.

1 call to EntityQuery::isNullOperator()
EntityQuery::buildFilterConditions in modules/graphql_core/src/Plugin/GraphQL/Fields/EntityQuery/EntityQuery.php
Recursively builds the filter condition groups.

File

modules/graphql_core/src/Plugin/GraphQL/Fields/EntityQuery/EntityQuery.php, line 401

Class

EntityQuery
@GraphQLField( id = "entity_query", secure = false, type = "EntityQueryResult", arguments = { "filter" = "EntityQueryFilterInput", "sort" = "[EntityQuerySortInput]", "offset" =…

Namespace

Drupal\graphql_core\Plugin\GraphQL\Fields\EntityQuery

Code

protected function isNullOperator($operator) {
  $null = [
    "IS NULL",
    "IS NOT NULL",
  ];
  return in_array($operator, $null);
}