Problem/Motivation

\Drupal\graphql_core_schema\Plugin\GraphQL\EntityQueryBase::buildFilterConditions() is not passing the correct operator to \Drupal\graphql_core_schema\Plugin\GraphQL\EntityQueryBase::isUnaryOperator(),\Drupal\graphql_core_schema\Plugin\GraphQL\EntityQueryBase::isRangeOperator() and \Drupal\graphql_core_schema\Plugin\GraphQL\EntityQueryBase::isNullOperator()

Steps to reproduce

Do the following graphql query on Drupal 11...

query SearchContent($limit: Int, $offset: Int, $sort: [EntityQuerySortInput!]) {
  entityQuery(
    entityType: NODE
    filter: {conditions: [{field: "type", value: "article", operator: EQUAL}], groups: [], conjunction: AND}
    sort: $sort
    limit: $limit
    offset: $offset
  ) {
    items {
      id
    }
    total
  }
}

with the variables:

{
  "limit": 10,
  "offset": 0,
  "sort": [
    {
      "field": "created",
      "direction": "DESC"
    }
  ]
}

Proposed resolution

Passed the mapped operator to these functions.

This is a critical bug because this breaks a site during a D10 to D11 upgrade due to a deprecation changing to an exception.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
alexpott’s picture

The test fail is unrelated to this issue and is fixed by #3515177: RouteTest::testResolveNode() in GraphQL Core Schema fails on HEAD

czigor made their first commit to this issue’s fork.

czigor’s picture

Status: Needs review » Fixed

Committed, thanks!

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.